Function at 0x404180
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
mov dword [ebp - 0x54], eax
mov eax, dword [edx]
mov dword [ebp - 0x7c], edx
mov dword [esp], eax
call fcn.0040f720
cmp eax, 0xb
mov ebx, eax
jbe 0x404303
mov eax, dword [0x4161f8]
test eax, eax
setne al
xor edx, edx
cmp ebx, 0x14
seta dl
test edx, eax
jne 0x4041e6
mov eax, dword [ebp - 0x54]
mov edx, ebx
call fcn.004040a0
inc eax
mov edx, 0xffffffff
je 0x4041d9
test ebx, ebx
jne 0x4042d0
xor edx, edx
add esp, 0x9c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx]
mov dword [esp], eax
call fcn.0040f720
mov esi, eax
sub esi, 4
je 0x4041bd
sub eax, 3
mov dword [esp], eax
call fcn.0040fee0
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x4041bd
mov edi, dword [ebp - 0x7c]
mov eax, dword [edi]
mov dword [esp], eax
call fcn.0040f720
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x6c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov eax, dword [edi]
mov dword [esp], eax
call fcn.00410040
test eax, eax
mov esi, eax
je 0x404420
mov byte [ebp - 0x4d], 0xc3
mov eax, dword [ebp - 0x54]
mov edi, 1
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 8], eax
lea eax, [ebp - 0x4d]
mov dword [esp], eax
call sub.cygwin1.dll_fwrite
test eax, eax
je 0x4042b6
mov eax, dword [ebp - 0x54]
mov edx, esi
call fcn.004040a0
inc eax
je 0x4042b6
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx]
mov dword [esp], eax
call fcn.0040f720
mov edx, eax
mov eax, dword [ebp - 0x54]
call fcn.004040a0
inc eax
je 0x4042b6
mov dword [esp + 4], esi
mov edi, dword [ebp - 0x54]
mov ecx, 1
mov dword [esp + 8], ecx
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sub.cygwin1.dll_fwrite
test eax, eax
jne 0x40443b
mov edx, dword [ebp - 0x6c]
mov dword [esp], edx
call fcn.0040ffb0
mov edx, 0xffffffff
jmp 0x4041d9
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x54]
mov edx, 1
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x7c]
mov dword [esp + 0xc], eax
mov eax, dword [edx]
mov dword [esp], eax
call sub.cygwin1.dll_fwrite
test eax, eax
mov edx, 0xffffffff
jne 0x4041d7
jmp 0x4041d9
mov eax, dword [ebp - 0x7c]
mov edi, 0xa
mov eax, dword [eax]
mov dword [esp + 8], edi
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 0x4c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.cygwin1.dll_strtoll
mov dword [ebp - 0x60], eax
mov edi, eax
mov eax, dword [ebp - 0x4c]
sar edi, 0x1f
mov dword [ebp - 0x5c], edi
cmp byte [eax], 0
jne 0x4041a7
mov edx, dword [ebp - 0x5c]
mov esi, str._lld
mov ecx, 0x20
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x60]
lea esi, [ebp - 0x48]
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x48]
mov dword [esp + 0xc], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call sub.cygwin1.dll_snprintf
nop
lea esi, [esi]
mov eax, dword [esi]
add esi, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x404370
test edx, 0x8080
je 0x404430
mov eax, dword [ebp - 0x58]
add dl, dl
lea edi, [ebp - 0x48]
sbb esi, 3
sub esi, edi
mov dword [esp], eax
call fcn.0040f720
cmp esi, eax
jne 0x4041a7
mov edx, dword [ebp - 0x58]
mov esi, edi
mov dword [esp], edx
call fcn.0040f720
cld
mov edi, dword [ebp - 0x58]
mov ecx, eax
cmp eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4041a7
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
add eax, 0x80
adc edx, 0
cmp edx, 0
ja 0x40445e
cmp eax, 0xff
ja 0x40445e
movzx eax, byte [ebp - 0x60]
mov byte [ebp - 0x28], 0xc0
mov byte [ebp - 0x27], al
mov eax, 2
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x54]
lea edi, [ebp - 0x28]
mov dword [esp], edi
mov dword [esp + 0xc], edx
mov edx, 1
mov dword [esp + 8], edx
call sub.cygwin1.dll_fwrite
cmp eax, 1
sbb edx, edx
jmp 0x4041d9
mov edi, dword [ebp - 0x6c]
mov dword [esp], edi
call fcn.0040ffb0
jmp 0x4041bd
shr edx, 0x10
add esi, 2
jmp 0x404393
mov edi, dword [ebp - 0x6c]
mov dword [esp], edi
call fcn.0040ffb0
cmp esi, 0xffffffff
je 0x4042c1
xor edx, edx
test esi, esi
jg 0x4041d9
jmp 0x4041bd
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
add eax, 0x8000
adc edx, 0
cmp edx, 0
ja 0x40449a
cmp eax, 0xffff
ja 0x40449a
movzx edx, byte [ebp - 0x60]
mov byte [ebp - 0x28], 0xc1
mov eax, dword [ebp - 0x60]
mov byte [ebp - 0x27], dl
mov edx, dword [ebp - 0x5c]
shrd eax, edx, 8
mov byte [ebp - 0x26], al
mov eax, 3
jmp 0x4043f7
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
add eax, 0x80000000
adc edx, 0
cmp edx, 0
ja 0x4041a7
movzx edx, byte [ebp - 0x60]
mov byte [ebp - 0x28], 0xc2
mov eax, dword [ebp - 0x60]
mov byte [ebp - 0x27], dl
mov edx, dword [ebp - 0x5c]
shrd eax, edx, 8
sar edx, 8
mov byte [ebp - 0x26], al
shrd eax, edx, 8
sar edx, 8
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x25], al
shrd eax, edx, 8
mov byte [ebp - 0x24], al
mov eax, 5
mov dword [ebp - 0x5c], edx
jmp 0x4043f7