Function at 0x4c2440
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x52e030]
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 + 0x8684]
mov ecx, dword [ebx]
push 0x5c
push ecx
mov dword [ebp - 0x4c], edi
call dword [sym.imp.MSVCR100.dll_strchr]
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.004bbd30
mov ecx, dword [edi]
mov dword [ebp - 0x50], edx
mov edx, dword [esi + 0x154]
mov dword [ebp - 0x54], eax
mov dword [edi + 0x284], edx
mov eax, dword [esi + 0x104]
mov dword [edi + 0x288], eax
lea eax, [esi + 0x55c]
mov dword [ecx + 0xdc], eax
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x4c24c9
pop edi
pop esi
mov eax, 0x25
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
cmp byte [eax + 1], 0
je 0x4c24b3
mov edx, dword [esi + 0x8670]
or edx, dword [esi + 0x8674]
mov eax, dword [ebx]
je 0x4c24f0
push 0x4f5d70
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
jmp 0x4c254b
mov ecx, dword [edi]
mov edx, dword [ecx + 0x334]
push edx
push 0x8301
push eax
call dword [sym.imp.MSVCR100.dll__open]
add esp, 0xc
test eax, eax
jns 0x4c2533
mov ecx, dword [ebx]
push ecx
push str.Cant_open__s_for_writing
push esi
call fcn.004b6c40
add esp, 0xc
pop edi
pop esi
mov eax, 0x17
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.MSVCR100.dll__close]
mov edx, dword [ebx]
push 0x4f5d50
push edx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 0xc
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x4c2557
mov eax, dword [ebx]
push eax
jmp 0x4c250f
mov eax, dword [esi + 0x1b0]
mov ecx, dword [esi + 0x1b4]
cmp eax, 0xffffffff
jne 0x4c256c
cmp ecx, eax
je 0x4c2577
push ecx
push eax
push esi
call fcn.004cf6a0
add esp, 0xc
cmp dword [esi + 0x8674], 0
jg 0x4c25e0
jl 0x4c258b
cmp dword [esi + 0x8670], 0
jae 0x4c25e0
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x3c]
push ecx
push edx
call dword [sym.imp.MSVCR100.dll__fileno]
add esp, 4
push eax
call dword [sym.imp.MSVCR100.dll__fstat64]
add esp, 8
test eax, eax
je 0x4c25ca
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebx]
push ecx
push str.Cant_get_the_size_of__s
push esi
call fcn.004b6c40
add esp, 0x10
jmp 0x4c251d
mov edx, dword [ebp - 0x24]
mov dword [esi + 0x8670], edx
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x8674], eax
lea esp, [esp]
lea ecx, [ebp - 0x58]
push ecx
push 0x4000
push edi
call fcn.004b2910
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4c26ce
mov edx, dword [ebp - 0x58]
test edx, edx
jle 0x4c26bc
mov ecx, dword [esi + 0x8670]
mov eax, dword [esi + 0x8674]
mov ebx, ecx
or ebx, eax
mov edi, edx
je 0x4c263b
xor edi, edi
xor ebx, ebx
cmp edi, eax
jg 0x4c269c
jl 0x4c2629
cmp edx, ecx
ja 0x4c269c
sub ecx, edx
sbb eax, edi
mov dword [esi + 0x8670], ecx
mov dword [esi + 0x8674], eax
xor edi, edi
lea eax, [esi + 0x55c]
mov edx, dword [ebp - 0x40]
push edx
push edi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x4c26b5
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.004cf640
mov edi, dword [ebp - 0x4c]
push edi
call fcn.004cf6e0
add esp, 0x10
test eax, eax
jne 0x4c26c9
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x54]
push eax
push ecx
push esi
call fcn.004d0f30
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4c25e0
jmp 0x4c26ce
sub edx, ecx
lea eax, [ecx + esi + 0x55c]
mov edi, edx
mov dword [esi + 0x8670], ebx
mov dword [esi + 0x8674], ebx
jmp 0x4c2641
mov ebx, 0x37
jmp 0x4c26ce
push edi
call fcn.004cf6e0
add esp, 4
test eax, eax
je 0x4c26ce
mov ebx, 0x2a
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.00475360
mov esp, ebp
pop ebp
ret