Function at 0x4051c6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x856c
call fcn.00412c18
mov dword [ebp - 0x8514], 0x406a58
mov dword [ebp - 0x8510], 0x44b4a2
lea eax, [ebp - 0x850c]
lea edx, [ebp - 0x18]
mov dword [eax], edx
mov edx, 0x4056c9
mov dword [eax + 4], edx
mov dword [eax + 8], esp
lea eax, [ebp - 0x852c]
mov dword [esp], eax
call fcn.00412eb8
lea edx, [ebp - 0x8028]
mov eax, 0x8001
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
call sub.msvcrt.dll_memset
mov dword [ebp - 0x802c], 0
mov dword [ebp - 0x8038], 0
mov dword [ebp - 0x8034], 0
mov dword [esp + 8], 0x8000
lea eax, [ebp - 0x8028]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [ebp - 0x8528], 0xffffffff
call fcn.0041af84
mov dword [ebp - 0x8030], eax
lea eax, [ebp - 0x8028]
mov dword [esp + 4], eax
mov dword [esp], 0x44e6a1
call sub.msvcrt.dll_printf
mov dword [esp + 8], 0x8000
lea eax, [ebp - 0x8028]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0041af84
mov dword [ebp - 0x8030], eax
lea eax, [ebp - 0x8028]
mov dword [esp + 4], eax
mov dword [esp], 0x44e6ad
call sub.msvcrt.dll_printf
lea eax, [ebp - 0x18]
add eax, dword [ebp - 0x8030]
sub eax, 0x8011
mov byte [eax], 0
lea eax, [ebp - 0x8028]
mov dword [esp], eax
call fcn.0044b41c
mov dword [ebp - 0x8038], eax
mov dword [ebp - 0x8034], edx
mov eax, dword [ebp - 0x8038]
mov edx, dword [ebp - 0x8034]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0041ae90
mov dword [ebp - 0x8040], 0
mov dword [ebp - 0x803c], 0
cmp dword [ebp - 0x8034], 0
jg 0x405373
cmp dword [ebp - 0x8034], 0
js 0x405340
cmp dword [ebp - 0x8038], 0
ja 0x405373
mov dword [esp], 0x44e6bd
mov dword [ebp - 0x8528], 0xffffffff
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x802c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebp - 0x8530], 0
jmp 0x405716
mov dword [esp + 4], 0x44e6d1
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x802c], eax
mov eax, dword [ebp - 0x8038]
mov edx, dword [ebp - 0x8034]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], 0x44e6d4
mov dword [ebp - 0x8528], 0xffffffff
call sub.msvcrt.dll_printf
mov dword [ebp - 0x8044], 0
mov dword [esp + 8], 0x8000
lea eax, [ebp - 0x8028]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [ebp - 0x8528], 0xffffffff
call fcn.0041b208
mov dword [ebp - 0x8030], eax
cmp dword [ebp - 0x8030], 0
jg 0x4053fb
jmp 0x4055c2
mov eax, dword [ebp - 0x8038]
or eax, dword [ebp - 0x8034]
test eax, eax
je 0x40552c
mov ecx, dword [ebp - 0x8040]
mov ebx, dword [ebp - 0x803c]
mov eax, ecx
mov edx, ebx
shld edx, eax, 2
shl eax, 2
add eax, ecx
adc edx, ebx
mov ecx, eax
mov ebx, edx
shld ebx, ecx, 2
shl ecx, 2
add eax, ecx
adc edx, ebx
mov ecx, eax
mov ebx, edx
shld ebx, ecx, 2
shl ecx, 2
mov eax, dword [ebp - 0x8038]
mov edx, dword [ebp - 0x8034]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp], ecx
mov dword [esp + 4], ebx
call fcn.00412c48
mov dword [ebp - 0x8538], eax
mov dword [ebp - 0x8534], edx
mov eax, dword [ebp - 0x8044]
mov dword [ebp - 0x8540], eax
cdq
mov dword [ebp - 0x853c], edx
mov eax, dword [ebp - 0x853c]
cmp dword [ebp - 0x8534], eax
jl 0x40552c
mov edx, dword [ebp - 0x853c]
cmp dword [ebp - 0x8534], edx
jg 0x4054b1
mov eax, dword [ebp - 0x8540]
cmp dword [ebp - 0x8538], eax
jbe 0x40552c
mov ecx, dword [ebp - 0x8040]
mov ebx, dword [ebp - 0x803c]
mov eax, ecx
mov edx, ebx
shld edx, eax, 2
shl eax, 2
add eax, ecx
adc edx, ebx
mov ecx, eax
mov ebx, edx
shld ebx, ecx, 2
shl ecx, 2
add eax, ecx
adc edx, ebx
mov ecx, eax
mov ebx, edx
shld ebx, ecx, 2
shl ecx, 2
mov eax, dword [ebp - 0x8038]
mov edx, dword [ebp - 0x8034]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp], ecx
mov dword [esp + 4], ebx
call fcn.00412c48
mov dword [ebp - 0x8044], eax
mov eax, dword [ebp - 0x8044]
mov dword [esp + 4], eax
mov dword [esp], str.___d
mov dword [ebp - 0x8528], 0xffffffff
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x802c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x8030]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x8028]
mov dword [esp], eax
mov dword [ebp - 0x8528], 0xffffffff
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x8030]
mov edx, eax
mov ecx, eax
sar ecx, 0x1f
lea eax, [ebp - 0x8040]
add dword [eax], edx
adc dword [eax + 4], ecx
mov eax, dword [ebp - 0x8040]
mov edx, dword [ebp - 0x803c]
mov dword [ebp - 0x8548], eax
mov dword [ebp - 0x8544], edx
mov edx, dword [ebp - 0x8544]
cmp edx, dword [ebp - 0x8034]
jl 0x4053c0
mov eax, dword [ebp - 0x8544]
cmp eax, dword [ebp - 0x8034]
jg 0x4055c2
mov edx, dword [ebp - 0x8548]
cmp edx, dword [ebp - 0x8038]
jb 0x4053c0
mov eax, dword [ebp - 0x8040]
mov edx, dword [ebp - 0x803c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov eax, dword [ebp - 0x8038]
mov edx, dword [ebp - 0x8034]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], 0x44e6f4
mov dword [ebp - 0x8528], 0xffffffff
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x802c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x8108]
mov dword [esp], eax
call fcn.0040140a
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
lea eax, [ebp - 0x84f8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x8108]
mov dword [esp], eax
mov dword [ebp - 0x8528], 1
call fcn.00401542
lea eax, [ebp - 0x84f8]
mov dword [esp + 4], eax
mov dword [esp], str.md5:_s_n
call sub.msvcrt.dll_printf
mov dword [esp + 4], 0x44e383
lea eax, [ebp - 0x84f8]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0041b588
lea eax, [ebp - 0x84f8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
lea eax, [ebp - 0x84f8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0041b01c
mov dword [esp], 0x44e726
call sub.msvcrt.dll_printf
lea eax, [ebp - 0x8108]
mov dword [esp], eax
call fcn.0040144e
mov dword [ebp - 0x8530], 1
jmp 0x405716
lea eax, [ebp - 0x852c]
mov dword [esp], eax
call fcn.00412f98
mov eax, dword [ebp - 0x8530]
add esp, 0x856c
pop ebx
pop esi
pop edi
pop ebp
ret