Function at 0x4157c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x4abd08]
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 + 0x864c]
mov ecx, dword [ebx]
push 0x5c
push ecx
mov dword [ebp - 0x4c], edi
call fcn.0046d790
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.004346d0
mov ecx, dword [edi]
mov dword [ebp - 0x50], edx
mov edx, dword [esi + 0x154]
mov dword [ebp - 0x54], eax
mov dword [edi + 0x260], edx
mov eax, dword [esi + 0x104]
mov dword [edi + 0x264], eax
lea eax, [esi + 0x52c]
mov dword [ecx + 0xdc], eax
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x415848
pop edi
pop esi
mov eax, 0x25
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
cmp byte [eax + 1], 0
je 0x415832
mov edx, dword [esi + 0x8638]
or edx, dword [esi + 0x863c]
mov eax, dword [ebx]
je 0x41586e
push 0x493aa8
push eax
call fcn.0046e354
add esp, 8
jmp 0x4158c6
mov ecx, dword [edi]
mov edx, dword [ecx + 0x324]
push edx
push 0x8301
push eax
call fcn.0047dad0
add esp, 0xc
test eax, eax
jns 0x4158b0
mov ecx, dword [ebx]
push ecx
push str.Cant_open__s_for_writing
push esi
call fcn.0042d360
add esp, 0xc
pop edi
pop esi
mov eax, 0x17
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
push eax
call fcn.0047ba46
mov edx, dword [ebx]
push 0x493a88
push edx
call fcn.0046e354
add esp, 0xc
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x4158d2
mov eax, dword [ebx]
push eax
jmp 0x41588c
mov eax, dword [esi + 0x1a8]
mov ecx, dword [esi + 0x1ac]
cmp eax, 0xffffffff
jne 0x4158e7
cmp ecx, eax
je 0x4158f2
push ecx
push eax
push esi
call fcn.0042af70
add esp, 0xc
cmp dword [esi + 0x863c], 0
jg 0x415954
jl 0x415906
cmp dword [esi + 0x8638], 0
jae 0x415954
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x3c]
push ecx
push edx
call fcn.00479a96
add esp, 4
push eax
call fcn.0046f0dd
add esp, 8
test eax, eax
je 0x415942
mov eax, dword [ebp - 0x40]
push eax
call fcn.0046e0ec
mov ecx, dword [ebx]
push ecx
push str.Cant_get_the_size_of__s
push esi
call fcn.0042d360
add esp, 0x10
jmp 0x41589a
mov edx, dword [ebp - 0x24]
mov dword [esi + 0x8638], edx
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x863c], eax
lea ecx, [ebp - 0x58]
push ecx
push 0x4000
push edi
call fcn.00434760
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x415a41
mov edx, dword [ebp - 0x58]
test edx, edx
jle 0x415a2f
mov ecx, dword [esi + 0x8638]
mov eax, dword [esi + 0x863c]
mov ebx, ecx
or ebx, eax
mov edi, edx
je 0x4159af
xor edi, edi
xor ebx, ebx
cmp edi, eax
jg 0x415a0f
jl 0x41599d
cmp edx, ecx
ja 0x415a0f
sub ecx, edx
sbb eax, edi
mov dword [esi + 0x8638], ecx
mov dword [esi + 0x863c], eax
xor edi, edi
lea eax, [esi + 0x52c]
mov edx, dword [ebp - 0x40]
push edx
push edi
push 1
push eax
call fcn.0046f708
add esp, 0x10
cmp eax, edi
jne 0x415a28
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.0042af10
mov edi, dword [ebp - 0x4c]
push edi
call fcn.0042afb0
add esp, 0x10
test eax, eax
jne 0x415a3c
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x54]
push eax
push ecx
push esi
call fcn.00430050
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x415954
jmp 0x415a41
sub edx, ecx
lea eax, [ecx + esi + 0x52c]
mov edi, edx
mov dword [esi + 0x8638], ebx
mov dword [esi + 0x863c], ebx
jmp 0x4159b5
mov ebx, 0x37
jmp 0x415a41
push edi
call fcn.0042afb0
add esp, 4
test eax, eax
je 0x415a41
mov ebx, 0x2a
mov edx, dword [ebp - 0x40]
push edx
call fcn.0046e0ec
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0046c641
mov esp, ebp
pop ebp
ret