Function at 0x431640
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x38
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 8]
sub eax, dword [ecx]
push esi
mov esi, dword [ebp + 0xc]
sub eax, 0x10
sar eax, 4
sub eax, esi
push edi
mov dword [esp + 0x24], 1
je 0x431842
jmp 0x431674
mov eax, dword [esp + 0x28]
mov edi, dword [ebx + 0x10]
dec eax
mov dword [esp + 0x28], eax
test esi, esi
jle 0x4316de
mov eax, esi
shl eax, 4
add eax, dword [edi]
cmp eax, dword [ebx + 8]
jb 0x43171c
lea eax, [esp + 0x2c]
push eax
mov eax, esi
mov edi, ebx
call fcn.00411800
add esp, 4
test eax, eax
je 0x43184d
cmp dword [esp + 0x24], 0
je 0x431824
mov ecx, dword [ebp + 8]
mov edi, dword [esp + 0x2c]
push ecx
push edi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x431824
mov dword [esp + 0x24], 1
jmp 0x43182c
cmp esi, 0xfff0b9d8
jle 0x4316f0
mov eax, esi
shl eax, 4
add eax, dword [ebx + 8]
jmp 0x43171c
jne 0x4316fa
mov eax, dword [ebx + 0xc]
add eax, 0x28
jmp 0x43171c
mov ecx, dword [edi]
mov eax, 0xfff0b9d8
sub eax, esi
cmp dword [ecx + 8], 0x16
je 0x431690
mov ecx, dword [ecx]
movzx edx, byte [ecx + 6]
cmp eax, edx
jg 0x431690
shl eax, 4
add eax, ecx
cmp eax, 0x4ee480
je 0x431690
mov eax, dword [eax + 8]
and eax, 0xf
cmp eax, 3
jne 0x431690
mov eax, esi
mov ecx, ebx
call fcn.00411390
test eax, eax
je 0x431764
xor edi, edi
mov eax, esi
mov edx, ebx
call fcn.004116f0
push edx
push eax
mov eax, dword [ebp + 8]
push str._lld
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
jmp 0x431812
test esi, esi
jle 0x431783
shl esi, 4
add esi, dword [edi]
cmp esi, dword [ebx + 8]
jb 0x431777
mov esi, 0x4ee480
mov eax, dword [esi + 8]
cmp eax, 3
jne 0x4317be
fld qword [esi]
jmp 0x4317fa
cmp esi, 0xfff0b9d8
jle 0x431793
shl esi, 4
add esi, dword [ebx + 8]
jmp 0x431777
jne 0x43179d
mov esi, dword [ebx + 0xc]
add esi, 0x28
jmp 0x431777
mov eax, dword [edi]
mov esi, 0xfff0b9d8
sub esi, dword [ebp + 0xc]
cmp dword [eax + 8], 0x16
je 0x431772
mov eax, dword [eax]
movzx ecx, byte [eax + 6]
cmp esi, ecx
jg 0x431772
shl esi, 4
add esi, eax
jmp 0x431777
cmp eax, 0x13
jne 0x4317c7
fild qword [esi]
jmp 0x4317fa
and al, 0xf
cmp al, 4
jne 0x4317f8
mov eax, dword [esi]
add eax, 0x18
lea edi, [esp + 0x30]
call fcn.0041a070
mov edx, dword [esi]
mov ecx, dword [edx + 0xc]
inc ecx
cmp eax, ecx
jne 0x4317f8
cmp dword [esp + 0x38], 0x13
jne 0x4317f2
fild qword [esp + 0x30]
jmp 0x4317fa
fld qword [esp + 0x30]
jmp 0x4317fa
fldz
mov edx, dword [ebp + 8]
sub esp, 8
fstp qword [esp]
push str._.14g
push edx
call dword [sym.imp.MSVCR100.dll_fprintf]
mov esi, dword [ebp + 0xc]
add esp, 0x10
cmp dword [esp + 0x24], 0
je 0x431824
test eax, eax
jg 0x4316d1
mov dword [esp + 0x24], 0
inc esi
cmp dword [esp + 0x28], 0
mov dword [ebp + 0xc], esi
jne 0x431670
cmp dword [esp + 0x24], 0
je 0x43185d
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [str.string]
push edx
mov eax, esi
mov ecx, ebx
call fcn.0040f550
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
mov ecx, dword [ebx + 8]
mov dword [ecx + 8], 0
add dword [ebx + 8], 0x10
push eax
mov dword [esp + 0x30], eax
call dword [sym.imp.MSVCR100.dll_strerror]
add esp, 4
mov edi, eax
mov esi, ebx
call fcn.00411a30
mov ecx, dword [ebx + 8]
mov eax, dword [esp + 0x2c]
cdq
mov dword [ecx], eax
pop edi
mov dword [ecx + 4], edx
mov dword [ecx + 8], 0x13
add dword [ebx + 8], 0x10
mov eax, 3
pop esi
mov esp, ebp
pop ebp
ret