Function at 0x4154a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x4c
push ebx
push ebp
mov ebp, dword [esp + 0x58]
mov eax, dword [ebp]
push esi
push edi
mov edi, dword [eax + 0x8558]
mov ecx, dword [edi]
push 0x5c
push ecx
call fcn.004a9970
mov esi, dword [ebp]
mov ebx, eax
xor eax, eax
add esp, 8
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
call fcn.0041fdb0
mov ecx, dword [ebp]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x138]
mov dword [esp + 0x1c], eax
mov dword [ebp + 0x1b8], edx
mov eax, dword [esi + 0xf4]
mov dword [ebp + 0x1bc], eax
lea eax, [esi + 0x464]
mov dword [ecx + 0xd4], eax
test ebx, ebx
jne 0x415515
pop edi
pop esi
pop ebp
mov eax, 0x25
pop ebx
add esp, 0x4c
ret
cmp byte [ebx + 1], 0
je 0x415508
mov edx, dword [esi + 0x8550]
or edx, dword [esi + 0x8554]
mov eax, dword [edi]
je 0x415541
push 0x4c1c1c
push eax
call fcn.004a8391
mov ebx, eax
add esp, 8
mov dword [esp + 0x60], ebx
jmp 0x415597
mov ecx, dword [ebp]
mov edx, dword [ecx + 0x294]
push edx
push 0x8301
push eax
call fcn.004ad27a
add esp, 0xc
test eax, eax
jge 0x41557b
mov ecx, dword [edi]
push ecx
push str.Cant_open__s_for_writing
push esi
call fcn.0040d820
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x17
pop ebx
add esp, 0x4c
ret
push eax
call fcn.004b2b35
mov edx, dword [edi]
push 0x4c1bfc
push edx
call fcn.004a8391
add esp, 0xc
mov ebx, eax
mov dword [esp + 0x60], eax
test ebx, ebx
jne 0x4155a0
mov eax, dword [edi]
push eax
jmp 0x415560
mov eax, dword [esi + 0x180]
mov ecx, dword [esi + 0x184]
cmp eax, 0xffffffff
jne 0x4155b5
cmp ecx, eax
je 0x4155c0
push ecx
push eax
push esi
call fcn.00411ad0
add esp, 0xc
cmp dword [esi + 0x8554], 0
jg 0x415630
jl 0x4155d4
cmp dword [esi + 0x8550], 0
jae 0x415630
lea ecx, [esp + 0x24]
push ecx
push ebx
call fcn.004aeb1c
add esp, 4
push eax
call fcn.004abfe7
add esp, 8
test eax, eax
je 0x415613
push ebx
call fcn.004a8d62
mov edx, dword [edi]
push edx
push str.Cant_get_the_size_of__s
push esi
call fcn.0040d820
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 0x17
pop ebx
add esp, 0x4c
ret
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x8550], eax
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x8554], ecx
jmp 0x415630
lea edx, [esp + 0x10]
push edx
push 0x4000
push ebp
call fcn.00409490
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x415750
mov edx, dword [esp + 0x10]
test edx, edx
jle 0x41573e
mov ecx, dword [esi + 0x8550]
mov eax, dword [esi + 0x8554]
mov ebx, ecx
or ebx, eax
mov edi, edx
je 0x415695
xor edi, edi
xor ebx, ebx
cmp edi, eax
jg 0x41570a
jl 0x415683
cmp edx, ecx
ja 0x41570a
sub ecx, edx
sbb eax, edi
mov dword [esi + 0x8550], ecx
mov dword [esi + 0x8554], eax
xor edi, edi
lea eax, [esi + 0x464]
mov ebx, dword [esp + 0x60]
push ebx
push edi
push 1
push eax
call fcn.004a9e4d
add esp, 0x10
cmp eax, edi
jne 0x415726
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add eax, edi
adc ecx, 0
push ecx
push eax
push esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
call fcn.00411a70
push ebp
call fcn.00411b10
add esp, 0x10
test eax, eax
jne 0x41574b
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push esi
call fcn.004202c0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x415630
push ebx
call fcn.004a8d62
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
sub edx, ecx
lea eax, [ecx + esi + 0x464]
mov edi, edx
mov dword [esi + 0x8550], ebx
mov dword [esi + 0x8554], ebx
jmp 0x41569b
push ebx
mov edi, 0x37
call fcn.004a8d62
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
push ebp
call fcn.00411b10
add esp, 4
test eax, eax
je 0x415750
mov edi, 0x2a
push ebx
call fcn.004a8d62
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret