Function at 0x5a27c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f7a68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 8]
mov edx, ecx
mov dword [ebp - 0x10], edx
cmp ebx, 0xffffffff
jne 0x5a27fc
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
push esi
test ecx, ecx
je 0x5a2833
mov eax, dword [edx + 0x34]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x5a2833
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x5a2852
cmp dword [edx + 0x3c], 0
jne 0x5a2867
push eax
movsx eax, bl
push eax
call fcn.005aa943
add esp, 8
cmp eax, 0xffffffff
jne 0x5a281f
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x38], 0
mov byte [ebp - 0x14], bl
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], 8
cmp ecx, 0x10
jae 0x5a288d
lea eax, [ebp - 0x38]
mov byte [eax + 8], 0
mov dword [ebp - 4], 0
push edi
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
nop
cmp edx, 0x10
jb 0x5a2aba
mov ebx, eax
mov dword [ebp - 0x18], ebx
test eax, eax
je 0x5a28d3
mov ecx, eax
cmp edx, 0x10
jae 0x5a28bc
lea ecx, [ebp - 0x38]
cmp ecx, ebx
ja 0x5a28d3
mov ecx, eax
cmp edx, 0x10
jae 0x5a28ca
lea ecx, [ebp - 0x38]
mov esi, dword [ebp - 0x28]
add ecx, esi
cmp ebx, ecx
jbe 0x5a28de
call fcn.005a5131
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x5a2904
mov ecx, eax
cmp edx, 0x10
jae 0x5a28f0
lea ecx, [ebp - 0x38]
mov esi, dword [ebp - 0x28]
add ecx, esi
cmp ebx, ecx
jb 0x5a2904
call fcn.005a5131
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x28]
cmp edx, 0x10
jb 0x5a2ac5
mov esi, eax
test eax, eax
je 0x5a293a
mov ecx, eax
cmp edx, 0x10
jae 0x5a2920
lea ecx, [ebp - 0x38]
cmp ecx, esi
ja 0x5a293a
mov ecx, eax
cmp edx, 0x10
jae 0x5a292e
lea ecx, [ebp - 0x38]
mov ebx, dword [ebp - 0x28]
add ecx, ebx
mov ebx, dword [ebp - 0x18]
cmp esi, ecx
jbe 0x5a2945
call fcn.005a5131
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x5a2963
cmp edx, 0x10
jae 0x5a2955
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x28]
add eax, edx
cmp esi, eax
jb 0x5a2963
call fcn.005a5131
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [ebp - 0x1c]
push eax
add ebx, edi
push ebx
push esi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x13]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x44
push eax
call edx
test eax, eax
jl 0x5a2b57
cmp eax, 1
jg 0x5a2add
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
cmp edx, 0x10
jb 0x5a2acd
mov esi, eax
test eax, eax
je 0x5a29d2
mov ecx, eax
cmp edx, 0x10
jae 0x5a29bb
lea ecx, [ebp - 0x38]
cmp ecx, esi
ja 0x5a29d2
mov ecx, eax
cmp edx, 0x10
jae 0x5a29c9
lea ecx, [ebp - 0x38]
mov edi, dword [ebp - 0x28]
add ecx, edi
cmp esi, ecx
jbe 0x5a29dd
call fcn.005a5131
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x5a2a03
mov ecx, eax
cmp edx, 0x10
jae 0x5a29ef
lea ecx, [ebp - 0x38]
mov edi, dword [ebp - 0x28]
add ecx, edi
cmp esi, ecx
jb 0x5a2a03
call fcn.005a5131
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x1c]
sub edi, esi
je 0x5a2a84
cmp edx, 0x10
jb 0x5a2ad5
mov esi, eax
test eax, eax
je 0x5a2a3a
mov ecx, eax
cmp edx, 0x10
jae 0x5a2a23
lea ecx, [ebp - 0x38]
cmp ecx, esi
ja 0x5a2a3a
mov ecx, eax
cmp edx, 0x10
jae 0x5a2a31
lea ecx, [ebp - 0x38]
mov ebx, dword [ebp - 0x28]
add ecx, ebx
cmp esi, ecx
jbe 0x5a2a45
call fcn.005a5131
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x5a2a63
cmp edx, 0x10
jae 0x5a2a55
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x28]
add eax, edx
cmp esi, eax
jb 0x5a2a63
call fcn.005a5131
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.005a5569
add esp, 0x10
cmp edi, eax
jne 0x5a2b57
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + 0x41], 1
lea ecx, [ebp - 0x14]
cmp dword [ebp - 0x20], ecx
jne 0x5a2b39
test edi, edi
ja 0x5a28a0
cmp dword [ebp - 0x28], 0x20
lea ecx, [ebp - 0x3c]
jae 0x5a2b5a
push 0
push 8
call fcn.0041e240
jmp 0x5a2899
lea ebx, [ebp - 0x38]
mov dword [ebp - 0x18], ebx
jmp 0x5a28b2
lea esi, [ebp - 0x38]
jmp 0x5a2916
lea esi, [ebp - 0x38]
jmp 0x5a29b1
lea esi, [ebp - 0x38]
jmp 0x5a2a19
cmp eax, 3
jne 0x5a2b57
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x4c]
mov ecx, dword [ebp - 0x14]
push eax
push ecx
call fcn.005a1920
add esp, 8
test al, al
je 0x5a2b19
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x3c]
call fcn.00416740
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x3c]
or esi, 0xffffffff
call fcn.00416740
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x3c]
call fcn.00416740
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x3c]
call fcn.00416740
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4