Function at 0x437400
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [0x46b694]
mov dword [esp + 0x10], esi
call fcn.004224a0
mov edi, eax
test edi, edi
mov dword [esp + 0x20], edi
je 0x437836
lea eax, [esp + 0x40]
push 8
push eax
push 0x20
mov ecx, edi
call fcn.00437dc0
mov ecx, dword [0x46b694]
mov dword [esp + 0xc], 0
mov eax, dword [ecx + 0x4c]
sub eax, 0
je 0x437495
dec eax
je 0x437465
dec eax
jne 0x4374a9
lea edx, [esp + 0x28]
push 0x10
push edx
push 0xd
jmp 0x43749e
lea eax, [esp + 0x28]
push 0x10
push eax
push 0xd
mov ecx, edi
call fcn.00437dc0
mov ebx, eax
mov ecx, 0x10
sub ecx, ebx
lea edx, [esp + ebx + 0x28]
push ecx
push edx
push 0xa
mov ecx, edi
call fcn.00437dc0
add ebx, eax
mov dword [esp + 0xc], ebx
jmp 0x4374a9
lea eax, [esp + 0x28]
push 0x10
push eax
push 0xa
mov ecx, edi
call fcn.00437dc0
mov dword [esp + 0xc], eax
lea ecx, [esp + 0x38]
push 8
push ecx
push 0xc
mov ecx, edi
call fcn.00437dc0
mov edx, dword [esi + 0x10]
mov dword [esi + 0x14], 0
test edx, edx
je 0x437512
mov ecx, dword [esi + 0x14]
xor ebx, ebx
test ecx, ecx
je 0x437505
fld qword [edx]
fcomp qword [ecx]
fnstsw ax
test ah, 1
jne 0x4374fc
fld qword [edx]
fcomp qword [ecx]
fnstsw ax
test ah, 0x40
je 0x4374f3
fld qword [edx + 0x10]
fcomp qword [ecx + 0x10]
fnstsw ax
test ah, 1
jne 0x4374fc
mov ebx, ecx
mov ecx, dword [ecx + 0x38]
test ecx, ecx
jne 0x4374d0
test ebx, ebx
je 0x437505
mov dword [ebx + 0x38], edx
jmp 0x437508
mov dword [esi + 0x14], edx
mov dword [edx + 0x38], ecx
mov edx, dword [edx + 0x34]
test edx, edx
jne 0x4374c7
mov ebx, dword [esi + 0x14]
test ebx, ebx
je 0x43757e
mov esi, dword [esi + 0x14]
xor edi, edi
cmp esi, ebx
je 0x43756c
fld qword [ebx]
fcomp qword [esi + 8]
fnstsw ax
test ah, 1
jne 0x43753e
mov edx, dword [esi + 0x2c]
mov eax, dword [esi + 0x20]
lea eax, [edx + eax + 4]
cmp eax, edi
jle 0x437565
jmp 0x437563
fld qword [ebx]
fcomp qword [esi]
fnstsw ax
test ah, 0x41
jne 0x437565
fld qword [ebx]
fsub qword [esi]
fld qword [esi + 8]
fsub qword [esi]
fdivp st(1)
fimul dword [esi + 0x2c]
call sub.MSVCRT.dll__ftol
add eax, dword [esi + 0x20]
cmp eax, edi
jle 0x437565
mov edi, eax
mov esi, dword [esi + 0x38]
cmp esi, ebx
jne 0x437522
mov esi, dword [esp + 0x10]
mov dword [ebx + 0x20], edi
mov ebx, dword [ebx + 0x38]
test ebx, ebx
jne 0x437519
mov edi, dword [esp + 0x20]
mov esi, dword [esi + 0x10]
mov dword [esp + 0x14], 0
test esi, esi
je 0x43759d
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jmp 0x4375ad
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
test esi, esi
je 0x437805
mov eax, dword [esp + 0x10]
cmp dword [eax], 0
je 0x4375cd
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4375cd
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x14], ecx
mov eax, dword [esi + 0x2c]
xor ebx, ebx
test eax, eax
jle 0x437675
test ebx, ebx
jle 0x437624
mov edx, dword [esi + 0x28]
fld qword [edx + ebx*8 - 8]
lea edi, [edx + ebx*8]
call sub.MSVCRT.dll__ftol
fld qword [edi]
mov dword [esp + 0x24], eax
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x24]
mov dx, word [ecx + ebx*2]
lea ecx, [ecx + ebx*2]
cmp dx, word [ecx - 2]
jne 0x437615
mov edi, dword [esp + 0x24]
mov ecx, eax
sub ecx, edi
cmp ecx, 5
jl 0x437665
cmp dx, 0x20
jne 0x437624
sub eax, dword [esp + 0x24]
cmp eax, 3
jl 0x437665
xor eax, eax
mov ecx, pe_nt_image_headers32
lea edi, [esp + 0x48]
push eax
rep stosd dword es:[edi], eax
push eax
mov eax, dword [esi + 0x24]
lea edx, [esp + 0x50]
push 0x400
push edx
lea ecx, [eax + ebx*2]
push 1
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp + 8]
push edx
push eax
lea eax, [esp + 0x50]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov eax, dword [esi + 0x2c]
inc ebx
cmp ebx, eax
jl 0x4375da
mov edi, dword [esp + 0x20]
fld qword [esi + 0x18]
mov ecx, dword [esi + 0x2c]
mov eax, dword [esp + 0x14]
fcomp qword [esp + 0x18]
add eax, ecx
mov dword [esp + 0x14], eax
fnstsw ax
test ah, 0x41
jne 0x43769e
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x43772e
mov edx, dword [esp + 0x10]
cmp dword [edx], 0
je 0x4376bf
fld qword [ecx + 0x18]
fcomp qword [esi + 0x10]
fnstsw ax
test ah, 1
jne 0x4376ed
fld qword [esi + 0x10]
fmul qword [0x44b0e8]
fld qword [esi + 0x18]
fmul qword [0x44b0d8]
faddp st(1)
fcomp qword [ecx + 0x10]
fnstsw ax
test ah, 0x41
jne 0x4376ed
fld qword [ecx]
fcomp qword [esi + 8]
fnstsw ax
test ah, 1
je 0x4377fb
test ecx, ecx
je 0x43772e
fld qword [ecx + 0x18]
fcomp qword [esi + 0x18]
fnstsw ax
test ah, 0x40
je 0x43770b
fld qword [ecx + 0x10]
fcomp qword [esi + 0x10]
fnstsw ax
test ah, 0x40
jne 0x43772e
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0xc]
push edi
push eax
lea ecx, [esp + 0x30]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov dword [esp + 0x14], 0
jmp 0x437731
mov edi, dword [ebp + 8]
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x4377d0
fld qword [ecx + 0x10]
fcom qword [ecx + 0x10]
fnstsw ax
test ah, 0x41
jne 0x43774e
fstp st(0)
fld qword [ecx + 0x10]
mov edx, dword [ecx + 0x34]
test edx, edx
je 0x437774
fld qword [edx + 0x10]
fcomp qword [ecx + 0x18]
fnstsw ax
test ah, 1
je 0x437774
fld qword [edx]
fcomp qword [ecx + 8]
fnstsw ax
test ah, 1
jne 0x437774
mov ecx, edx
test ecx, ecx
jne 0x43773f
fsub qword [esp + 0x18]
fld qword [esi + 0x18]
fsub qword [esi + 0x10]
fdivp st(1)
fadd qword [0x449978]
call sub.MSVCRT.dll__ftol
mov edx, dword [esp + 0x10]
mov ecx, dword [edx]
test ecx, ecx
je 0x4377a5
cmp eax, 2
jle 0x4377a1
mov eax, 2
jmp 0x4377b5
test ecx, ecx
jne 0x4377b1
cmp eax, 5
jle 0x4377b1
mov eax, 5
jmp 0x4377b5
test eax, eax
jle 0x4377d0
mov ebx, eax
mov eax, dword [esp + 0xc]
push edi
push eax
lea ecx, [esp + 0x30]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
dec ebx
jne 0x4377b7
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x4377e7
mov edx, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
jmp 0x4377f7
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x20]
mov esi, ecx
test esi, esi
jne 0x4375b5
mov esi, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
push esi
push ecx
lea edx, [esp + 0x30]
push 1
push edx
call ebx
mov eax, dword [esp + 0x1c]
push esi
push eax
lea ecx, [esp + 0x40]
push 1
push ecx
call ebx
add esp, 0x20
mov ecx, edi
call fcn.00437d40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4