Function at 0x4b1a60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x76c12c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
mov ebx, dword [eax + 0x8540]
mov ecx, dword [ebx]
push 0x5c
push ecx
mov dword [ebp - 0x4c], edi
call fcn.00590c80
mov esi, dword [edi]
mov dword [ebp - 0x40], eax
xor eax, eax
add esp, 8
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
call fcn.004be520
mov ecx, dword [edi]
mov dword [ebp - 0x50], edx
mov edx, dword [esi + 0x138]
mov dword [ebp - 0x54], eax
mov dword [edi + 0x184], edx
mov eax, dword [esi + 0xf4]
mov dword [edi + 0x188], eax
lea eax, [esi + 0x454]
mov dword [ecx + 0xd4], eax
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x4b1ae8
pop edi
pop esi
mov eax, 0x25
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058cf08
mov esp, ebp
pop ebp
ret
cmp byte [eax + 1], 0
je 0x4b1ad2
mov edx, dword [esi + 0x8538]
or edx, dword [esi + 0x853c]
mov eax, dword [ebx]
je 0x4b1b0b
push 0x692eb0
push eax
call fcn.00591eb3
jmp 0x4b1b58
mov ecx, dword [edi]
mov edx, dword [ecx + 0x288]
push edx
push 0x8301
push eax
call fcn.005a6423
add esp, 0xc
test eax, eax
jns 0x4b1b4d
mov ecx, dword [ebx]
push ecx
push str.Cant_open__s_for_writing
push esi
call fcn.004ab1b0
add esp, 0xc
pop edi
pop esi
mov eax, 0x17
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058cf08
mov esp, ebp
pop ebp
ret
push 0x692e90
push eax
call fcn.0058ddcd
add esp, 8
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x4b1b67
mov edx, dword [ebx]
push edx
jmp 0x4b1b29
mov eax, dword [esi + 0x180]
mov ecx, dword [esi + 0x184]
cmp eax, 0xffffffff
jne 0x4b1b7c
cmp ecx, eax
je 0x4b1b87
push ecx
push eax
push esi
call fcn.004ae550
add esp, 0xc
cmp dword [esi + 0x853c], 0
jg 0x4b1be0
jl 0x4b1b9b
cmp dword [esi + 0x8538], 0
jae 0x4b1be0
mov ecx, dword [ebx]
lea eax, [ebp - 0x3c]
push eax
push ecx
call fcn.00592b3e
add esp, 8
test eax, eax
je 0x4b1bcd
mov edx, dword [ebp - 0x40]
push edx
call fcn.0058eb79
mov eax, dword [ebx]
push eax
push str.Cant_get_the_size_of__s
push esi
call fcn.004ab1b0
add esp, 0x10
jmp 0x4b1b37
mov ecx, dword [ebp - 0x24]
mov dword [esi + 0x8538], ecx
mov edx, dword [ebp - 0x20]
mov dword [esi + 0x853c], edx
nop
lea eax, [ebp - 0x58]
push eax
push 0x4000
push edi
call fcn.004a6ef0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4b1ccd
mov edx, dword [ebp - 0x58]
test edx, edx
jle 0x4b1cbb
mov ecx, dword [esi + 0x8538]
mov eax, dword [esi + 0x853c]
mov ebx, ecx
or ebx, eax
mov edi, edx
je 0x4b1c3b
xor edi, edi
xor ebx, ebx
cmp edi, eax
jg 0x4b1c9b
jl 0x4b1c29
cmp edx, ecx
ja 0x4b1c9b
sub ecx, edx
sbb eax, edi
mov dword [esi + 0x8538], ecx
mov dword [esi + 0x853c], eax
xor edi, edi
lea eax, [esi + 0x454]
mov ecx, dword [ebp - 0x40]
push ecx
push edi
push 1
push eax
call fcn.0058ed44
add esp, 0x10
cmp eax, edi
jne 0x4b1cb4
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
add eax, edi
adc ecx, 0
push ecx
push eax
push esi
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
call fcn.004ae4f0
mov edi, dword [ebp - 0x4c]
push edi
call fcn.004ae590
add esp, 0x10
test eax, eax
jne 0x4b1cc8
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
push edx
push eax
push esi
call fcn.004becc0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4b1be0
jmp 0x4b1ccd
sub edx, ecx
lea eax, [ecx + esi + 0x454]
mov edi, edx
mov dword [esi + 0x8538], ebx
mov dword [esi + 0x853c], ebx
jmp 0x4b1c41
mov ebx, 0x37
jmp 0x4b1ccd
push edi
call fcn.004ae590
add esp, 4
test eax, eax
je 0x4b1ccd
mov ebx, 0x2a
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.0058eb79
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0058cf08
mov esp, ebp
pop ebp
ret