Function at 0x407690
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
mov eax, dword [0x40f1a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xd8], eax
xor eax, eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xe0], eax
lea eax, [ebp - 0x48]
mov byte [ebp - 0xdc], 0
mov byte [ebp - 0xd2], 0
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xe8], esi
push edi
test al, 3
jne 0x4076f8
xorps xmm0, xmm0
mov dword [ebp - 8], 0
movdqu xmmword [ebp - 0x48], xmm0
movdqu xmmword [ebp - 0x38], xmm0
movdqu xmmword [ebp - 0x28], xmm0
movdqu xmmword [ebp - 0x18], xmm0
jmp 0x407708
push 0x44
lea eax, [ebp - 0x48]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0xdc]
mov edi, edi
movsx eax, byte [esi]
inc esi
test eax, eax
je 0x4078f7
cmp eax, 0x25
jne 0x407710
xor ecx, ecx
mov dword [ebp - 0xf4], 0
mov dword [ebp - 0xec], 0
xor edi, edi
mov byte [ebp - 0xd1], cl
nop
movsx edx, byte [esi]
inc esi
test edx, edx
je 0x4078f1
lea eax, [edx - 0x24]
cmp eax, 0x56
ja case.0x40775f.37
movzx eax, byte [eax + 0x407f90]
jmp dword [eax*4 + 0x407f64]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx - 0x18]
lea ecx, [edx + ecx*2]
jmp case.0x40775f.39
mov eax, dword [ebp - 0xdc]
mov ecx, 1
cmp byte [ebp - 0xd1], 0
movzx eax, al
cmovne eax, ecx
mov byte [ebp - 0xd1], cl
mov dword [ebp - 0xdc], eax
xor ecx, ecx
jmp case.0x40775f.39
mov byte [ebp - 0xd2], 1
test ecx, ecx
jle case.0x407929.0
cmp ecx, 0x10
jg case.0x407929.0
cmp byte [ebp - 0xd1], 0
je 0x4077f4
mov eax, dword [ebp + ecx*4 - 0x48]
test eax, eax
je 0x4077cb
cmp eax, 1
jne case.0x407929.0
cmp dword [ebp - 0xe0], ecx
mov dword [ebp + ecx*4 - 0x48], 1
cmovg ecx, dword [ebp - 0xe0]
mov dword [ebp - 0xe0], ecx
xor ecx, ecx
mov byte [ebp - 0xd1], 0
jmp case.0x40775f.39
mov edi, ecx
xor ecx, ecx
jmp case.0x40775f.39
cmp dword [ebp - 0xec], 0
je 0x407815
mov dword [ebp - 0xf4], 1
jmp case.0x40775f.39
mov dword [ebp - 0xec], 1
jmp case.0x40775f.39
test edi, edi
je 0x40785a
cmp dword [ebp - 0xf4], 0
je 0x407838
mov eax, 3
jmp 0x407844
xor eax, eax
cmp dword [ebp - 0xec], eax
setne al
inc eax
mov ecx, dword [ebp + edi*4 - 0x48]
test ecx, ecx
je 0x407854
cmp ecx, eax
jne case.0x407929.0
mov dword [ebp + edi*4 - 0x48], eax
jmp 0x4078bf
mov cl, 1
mov dword [ebp - 0xdc], ecx
jmp 0x4078d8
test edi, edi
je 0x40785a
mov eax, dword [ebp + edi*4 - 0x48]
test eax, eax
je 0x407879
cmp eax, 1
jne case.0x407929.0
mov dword [ebp + edi*4 - 0x48], 1
jmp 0x4078bf
test edi, edi
je 0x40785a
mov eax, dword [ebp + edi*4 - 0x48]
test eax, eax
je 0x407898
cmp eax, 5
jne case.0x407929.0
mov dword [ebp + edi*4 - 0x48], 5
jmp 0x4078bf
test edi, edi
je 0x40785a
mov eax, dword [ebp + edi*4 - 0x48]
test eax, eax
je 0x4078b7
cmp eax, 4
jne case.0x407929.0
mov dword [ebp + edi*4 - 0x48], 4
cmp dword [ebp - 0xe0], edi
cmovg edi, dword [ebp - 0xe0]
mov dword [ebp - 0xe0], edi
mov ecx, dword [ebp - 0xdc]
cmp byte [ebp - 0xd1], 0
je 0x407710
mov byte [ebp - 0xdc], 1
jmp 0x407708
mov ecx, dword [ebp - 0xdc]
cmp byte [ebp - 0xd2], 0
je 0x407908
test cl, cl
jne case.0x407929.0
mov edi, dword [ebp - 0xe0]
mov ecx, 1
cmp edi, ecx
jl 0x4079aa
jmp 0x407920
mov eax, dword [ebp + ecx*4 - 0x48]
cmp eax, 5
ja case.default.0x407929
jmp dword [eax*4 + 0x407fe8]
mov edx, dword [ebp - 0xd8]
add edx, 4
mov dword [ebp - 0xd8], edx
mov eax, dword [edx - 4]
jmp 0x40799a
mov edx, dword [ebp - 0xd8]
add edx, 8
mov dword [ebp - 0xd8], edx
mov eax, dword [edx - 8]
mov dword [ebp + ecx*8 - 0xd0], eax
mov eax, dword [edx - 4]
mov dword [ebp + ecx*8 - 0xcc], eax
jmp case.default.0x407929
mov edx, dword [ebp - 0xd8]
add edx, 8
mov dword [ebp - 0xd8], edx
movsd xmm0, qword [edx - 8]
movsd qword [ebp + ecx*8 - 0xd0], xmm0
jmp case.default.0x407929
mov eax, dword [ebp - 0xd8]
add eax, 4
mov dword [ebp - 0xd8], eax
mov eax, dword [eax - 4]
mov dword [ebp + ecx*8 - 0xd0], eax
inc ecx
cmp ecx, edi
jle 0x407920
mov eax, dword [ebp - 0xe8]
movsx ecx, byte [eax]
mov dword [ebp - 0xec], ecx
test ecx, ecx
je 0x407f51
mov dword [ebp - 0x100], 0x30
jmp 0x4079d0
inc eax
cmp byte [ebx + 0x14], 0
mov dword [ebp - 0xe8], eax
jne 0x407f51
cmp ecx, 0x25
je 0x407a53
mov eax, dword [ebx + 8]
test eax, eax
je 0x407a29
mov esi, dword [ebx]
cmp esi, eax
jb 0x407a29
mov eax, dword [ebx + 0xc]
test eax, eax
je case.0x407ac5.38
mov edx, dword [ebx + 4]
sub esi, edx
je 0x407a24
push eax
push esi
push 1
push edx
call dword [sym.imp.MSVCR120.dll_fwrite]
add dword [ebx + 0x10], eax
add esp, 0x10
mov ecx, dword [ebp - 0xec]
cmp eax, esi
je 0x407a24
mov byte [ebx + 0x14], 1
mov eax, dword [ebx + 4]
mov dword [ebx], eax
mov eax, dword [ebx]
mov byte [eax], cl
jmp 0x407f38
call dword [sym.imp.MSVCR120.dll__errno]
pop edi
pop esi
mov dword [eax], 0x16
mov byte [ebx + 0x14], 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
xor esi, esi
xor edi, edi
xor edx, edx
mov dword [ebp - 0xec], esi
mov dword [ebp - 0xf0], esi
mov dword [ebp - 0xf4], edi
mov dword [ebp - 0xdc], esi
mov dword [ebp - 0xfc], edx
mov dword [ebp - 0xf8], edx
mov dword [ebp - 0xe0], edx
mov byte [ebp - 0xe1], dl
mov byte [ebp - 0xd1], dl
jmp 0x407aa0
xor edx, edx
mov eax, dword [ebp - 0xe8]
lea esp, [esp]
movsx ecx, byte [eax]
inc eax
mov dword [ebp - 0xe8], eax
test ecx, ecx
je 0x407f51
lea eax, [ecx - 0x24]
cmp eax, 0x56
ja case.0x407ac5.38
movzx eax, byte [eax + 0x408044]
jmp dword [eax*4 + 0x408000]
mov dword [ebp - 0xf0], 1
jmp case.0x407ac5.39
mov dword [ebp - 0xec], 1
jmp case.0x407ac5.39
test edx, edx
jne case.0x407ac5.49
mov eax, dword [ebp - 0xf4]
test edi, edi
cmove eax, dword [ebp - 0x100]
mov dword [ebp - 0xf4], eax
lea eax, [edx - 6]
lea eax, [edx + eax*4]
lea edx, [ecx + eax*2]
jmp case.0x407ac5.39
cmp byte [ebp - 0xd1], 0
je 0x407b23
xor al, al
mov edi, 1
mov byte [ebp - 0xd1], al
jmp 0x407a91
mov esi, edx
mov edi, 1
jmp 0x407a91
cmp byte [ebp - 0xd2], 0
je 0x407b4b
mov byte [ebp - 0xe1], 1
mov byte [ebp - 0xd1], 1
jmp 0x407a91
mov eax, dword [ebp - 0xd8]
add eax, 4
mov dword [ebp - 0xd8], eax
mov eax, dword [eax - 4]
test edi, edi
je 0x407b83
mov dword [ebp - 0xdc], eax
test eax, eax
jns 0x407b95
mov dword [ebp - 0xdc], 0
xor edi, edi
mov byte [ebp - 0xd1], 1
jmp 0x407a91
mov esi, eax
test eax, eax
jns 0x407b95
mov dword [ebp - 0xf0], 1
neg esi
mov byte [ebp - 0xd1], 1
jmp 0x407a91
cmp byte [ebp - 0xe1], 0
je 0x407bf7
mov eax, dword [ebp + edx*8 - 0xd0]
test edi, edi
je 0x407bd8
mov dword [ebp - 0xdc], eax
test eax, eax
jns 0x407bea
xor edi, edi
mov dword [ebp - 0xdc], 0
xor al, al
mov byte [ebp - 0xe1], al
jmp 0x407a91
mov esi, eax
test eax, eax
jns 0x407bea
mov dword [ebp - 0xf0], 1
neg esi
xor al, al
mov byte [ebp - 0xe1], al
jmp 0x407a91
mov dword [ebp - 0xe0], edx
jmp 0x407a91
cmp dword [ebp - 0xf8], 0
mov eax, dword [ebp - 0xe8]
je 0x407c20
mov dword [ebp - 0xfc], 1
jmp 0x407aa0
mov dword [ebp - 0xf8], 1
jmp 0x407aa0
mov al, byte [ebp - 0xd1]
test al, al
jne 0x407c47
test edi, edi
je 0x407c45
mov dword [ebp - 0xdc], edx
jmp 0x407c47
mov esi, edx
cmp byte [ebp - 0xd2], 0
mov edx, dword [ebp - 0xfc]
je 0x407c7f
test edx, edx
je 0x407c70
mov edx, dword [ebp - 0xe0]
mov eax, dword [ebp + edx*8 - 0xd0]
mov edx, dword [ebp + edx*8 - 0xcc]
jmp 0x407cad
mov eax, dword [ebp - 0xe0]
mov eax, dword [ebp + eax*8 - 0xd0]
jmp 0x407cac
test edx, edx
je 0x407c9a
mov edx, dword [ebp - 0xd8]
add edx, 8
mov dword [ebp - 0xd8], edx
mov eax, dword [edx - 8]
mov edx, dword [edx - 4]
jmp 0x407cad
mov eax, dword [ebp - 0xd8]
add eax, 4
mov dword [ebp - 0xd8], eax
mov eax, dword [eax - 4]
cdq
push ebx
push edi
push dword [ebp - 0xdc]
mov edi, dword [ebp - 0xf4]
push edi
push esi
mov esi, dword [ebp - 0xf0]
push esi
mov esi, dword [ebp - 0xec]
push esi
push ecx
push edx
push eax
call fcn.00408230
add esp, 0x28
jmp case.0x407ac5.38
mov al, byte [ebp - 0xd1]
test al, al
jne 0x407cf3
test edi, edi
je 0x407cf1
mov dword [ebp - 0xdc], edx
jmp 0x407cf3
mov esi, edx
cmp byte [ebp - 0xd2], 0
mov edx, dword [ebp - 0xfc]
je 0x407d2b
test edx, edx
je 0x407d1c
mov edx, dword [ebp - 0xe0]
mov eax, dword [ebp + edx*8 - 0xd0]
mov edx, dword [ebp + edx*8 - 0xcc]
jmp 0x407d5a
mov eax, dword [ebp - 0xe0]
mov eax, dword [ebp + eax*8 - 0xd0]
jmp 0x407d58
test edx, edx
je 0x407d46
mov edx, dword [ebp - 0xd8]
add edx, 8
mov dword [ebp - 0xd8], edx
mov eax, dword [edx - 8]
mov edx, dword [edx - 4]
jmp 0x407d5a
mov eax, dword [ebp - 0xd8]
add eax, 4
mov dword [ebp - 0xd8], eax
mov eax, dword [eax - 4]
xor edx, edx
push ebx
push edi
push dword [ebp - 0xdc]
mov edi, dword [ebp - 0xf4]
push edi
push esi
mov esi, dword [ebp - 0xf0]
push esi
mov esi, dword [ebp - 0xec]
push esi
push ecx
push edx
push eax
call fcn.00408230
add esp, 0x28
jmp case.0x407ac5.38
mov al, byte [ebp - 0xd1]
test al, al
jne 0x407d97
test edi, edi
cmove esi, edx
cmp byte [ebp - 0xd2], 0
je 0x407dc5
mov eax, dword [ebp - 0xe0]
push ebx
push esi
mov esi, dword [ebp - 0xf0]
movzx eax, byte [ebp + eax*8 - 0xd0]
push esi
push eax
call fcn.00408480
add esp, 0x10
jmp case.0x407ac5.38
mov eax, dword [ebp - 0xd8]
add eax, 4
push ebx
push esi
mov esi, dword [ebp - 0xf0]
mov dword [ebp - 0xd8], eax
movzx eax, byte [eax - 4]
push esi
push eax
call fcn.00408480
add esp, 0x10
jmp case.0x407ac5.38
mov al, byte [ebp - 0xd1]
test al, al
jne 0x407e03
test edi, edi
je 0x407e01
mov ecx, edx
jmp 0x407e09
mov esi, edx
mov ecx, dword [ebp - 0xdc]
cmp byte [ebp - 0xd2], 0
je 0x407e21
mov eax, dword [ebp - 0xe0]
mov eax, dword [ebp + eax*8 - 0xd0]
jmp 0x407e33
mov eax, dword [ebp - 0xd8]
add eax, 4
mov dword [ebp - 0xd8], eax
mov eax, dword [eax - 4]
push ebx
push edi
push ecx
push esi
mov esi, dword [ebp - 0xf0]
push esi
push eax
call fcn.00408100
add esp, 0x18
jmp case.0x407ac5.38
cmp byte [ebp - 0xd2], 0
je 0x407e64
mov eax, dword [ebp - 0xe0]
mov eax, dword [ebp + eax*8 - 0xd0]
jmp 0x407e76
mov eax, dword [ebp - 0xd8]
add eax, 4
mov dword [ebp - 0xd8], eax
mov eax, dword [eax - 4]
push eax
lea eax, [ebp - 0x44]
push 0x40d710
push eax
call dword [sym.imp.MSVCR120.dll_sprintf]
add esp, 0xc
test eax, eax
jns 0x407e96
mov byte [ebx + 0x14], 1
jmp case.0x407ac5.38
push ebx
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.004087e0
add esp, 0xc
jmp case.0x407ac5.38
mov al, byte [ebp - 0xd1]
test al, al
jne 0x407eb9
test edi, edi
jne 0x407ebf
mov esi, edx
mov edx, dword [ebp - 0xdc]
cmp byte [ebp - 0xd2], 0
je 0x407ed9
mov eax, dword [ebp - 0xe0]
movsd xmm0, qword [ebp + eax*8 - 0xd0]
jmp 0x407eed
mov eax, dword [ebp - 0xd8]
add eax, 8
mov dword [ebp - 0xd8], eax
movsd xmm0, qword [eax - 8]
push ebx
push edi
mov edi, dword [ebp - 0xf4]
push edx
push edi
push esi
mov esi, dword [ebp - 0xf0]
push esi
mov esi, dword [ebp - 0xec]
push esi
push ecx
sub esp, 8
movsd qword [esp], xmm0
call fcn.00408530
add esp, 0x28
jmp case.0x407ac5.38
mov eax, dword [ebx + 8]
test eax, eax
je 0x407f33
cmp dword [ebx], eax
jb 0x407f33
cmp dword [ebx + 0xc], 0
je case.0x407ac5.38
push ebx
call fcn.00407640
add esp, 4
mov eax, dword [ebx]
mov byte [eax], 0x25
inc dword [ebx]
mov eax, dword [ebp - 0xe8]
movsx ecx, byte [eax]
mov dword [ebp - 0xec], ecx
test ecx, ecx
jne 0x4079d0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409cf2
mov esp, ebp
pop ebp
ret