Function at 0x406080
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45c341
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x472940]
xor eax, esp
mov dword [esp + 0x2c0], eax
push ebx
push esi
push edi
mov eax, dword [0x472940]
xor eax, esp
push eax
lea eax, [esp + 0x2d8]
mov dword fs:[0], eax
xor ebx, ebx
push 0x104
lea eax, [esp + 0xc1]
mov edi, ecx
push ebx
push eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], ebx
mov byte [esp + 0xc8], bl
call fcn.00445f90
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax - 0xc]
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push 2
push ecx
push eax
call fcn.00411c08
mov esi, eax
add esp, 0x10
cmp esi, ebx
jne 0x406127
mov ecx, dword [esp + 0x14]
push 0x104
lea eax, [esp + 0xc0]
push eax
push ecx
call fcn.00412c88
add esp, 0xc
xor eax, eax
jmp 0x4065b4
lea edx, [esp + 0x54]
push edx
call fcn.004069f0
push esi
mov dword [esp + 0x2e4], ebx
mov dword [esp + 0x4c], ebx
call fcn.00413ed9
mov esi, eax
add esp, 4
push esi
mov dword [esp + 0x20], esi
call fcn.00412409
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40624e
push 0
push 0
push 0
push 0
push 0x100
lea eax, [esp + 0x1d8]
push eax
lea ecx, [esp + 0x84]
push ecx
push esi
call fcn.004123e2
add esp, 0x20
test eax, eax
jne 0x406231
call fcn.004368a6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4062df
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
lea eax, [esp + 0x1c4]
mov byte [esp + 0x2e0], 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4061c4
sub eax, edx
push eax
lea ecx, [esp + 0x1c8]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00401760
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
mov dword [esp + 0x2c], eax
add ebx, eax
lea eax, [esp + 0x24]
push eax
lea edi, [esp + 0x58]
mov dword [esp + 0x2c], edx
call fcn.00406a90
mov byte [esp + 0x2e0], 0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40622d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x1c]
push esi
call fcn.00412447
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x406160
mov edi, dword [esp + 0x18]
mov dword [esp + 0x48], ebx
mov eax, dword [edi + 8]
test eax, eax
je 0x406265
push 0
push 0xa
push 0x14d8
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [edi + 0xc]
push ecx
add edi, 0xc
sub eax, 0x10
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call fcn.00401850
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004020d0
add esp, 4
test al, al
jne 0x40629a
mov eax, dword [edi]
push eax
call fcn.00401bd0
add esp, 4
mov ecx, dword [esp + 0x64]
sub ecx, dword [esp + 0x60]
mov eax, 0x2aaaaaab
imul ecx
mov ecx, dword [esp + 0x1c]
sar edx, 1
mov ebx, edx
shr ebx, 0x1f
xor esi, esi
add ebx, edx
push ecx
mov dword [esp + 0x48], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x50], ebx
call fcn.00412409
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, esi
jne 0x406565
mov dword [esp + 0x40], esi
jmp 0x4062f4
push 0x80004005
call fcn.00401000
lea esp, [esp]
mov esi, dword [esp + 0x38]
cmp esi, ebx
jae 0x406565
mov ecx, dword [esp + 0x64]
sub ecx, dword [esp + 0x60]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x40631d
call fcn.004446ba
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x60]
push eax
lea edi, [ecx + edx]
call fcn.00414074
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x406538
cmp dword [edi + 4], eax
jne 0x4063d6
cmp dword [edi + 8], eax
jne 0x4063d6
mov eax, dword [esp + 0x18]
push edi
add eax, 0xc
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00402460
mov byte [esp + 0x2ec], 2
mov eax, dword [esp + 0x48]
add esp, 8
add eax, 0xfffffff0
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call fcn.00401850
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004020d0
add esp, 4
test al, al
jne 0x4063a5
mov edx, dword [esp + 0x3c]
push edx
call fcn.00401bd0
add esp, 4
mov byte [esp + 0x2e0], 0
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406500
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406500
mov ecx, dword [edi + 8]
push ecx
call fcn.004367c6
add esp, 4
mov ebx, eax
xor esi, esi
mov edx, dword [edi + 8]
mov eax, dword [esp + 0x1c]
sub edx, esi
push edx
add esi, ebx
push esi
push eax
call fcn.00414165
mov ecx, dword [esp + 0x24]
mov ecx, dword [ecx + 8]
mov esi, eax
add dword [esp + 0x50], esi
add esp, 0xc
test ecx, ecx
je 0x406470
mov edx, dword [esp + 0x44]
fild dword [esp + 0x44]
push 0
test edx, edx
jge 0x406421
fadd dword [0x4681c8]
mov eax, dword [esp + 0x4c]
fmul qword [0x4681c0]
fild dword [esp + 0x4c]
test eax, eax
jge 0x406439
fadd dword [0x4681c8]
fdivp st(1)
fadd qword [0x4681b8]
fnstcw word [esp + 0x24]
movzx eax, word [esp + 0x24]
or eax, 0xc00
mov dword [esp + 0x28], eax
fldcw word [esp + 0x28]
fistp qword [esp + 0x28]
mov edx, dword [esp + 0x28]
push edx
push 0x14d8
push ecx
fldcw word [esp + 0x30]
call dword [sym.imp.USER32.dll_PostMessageA]
test esi, esi
ja 0x4063e6
mov eax, dword [esp + 0x18]
add eax, 0xc
push edi
push eax
lea eax, [esp + 0x58]
push eax
call fcn.00402460
mov ecx, dword [esp + 0x5c]
mov edi, dword [edi + 8]
add esp, 0xc
push 0x468184
push ecx
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], 0
call fcn.0044450a
add esp, 0xc
test eax, eax
jne 0x4064d3
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4064d3
push eax
push 1
push edi
push ebx
call fcn.00445327
mov eax, dword [esp + 0x30]
push eax
call fcn.00445420
add esp, 0x14
push ebx
call fcn.004367bb
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4064fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x4c]
mov esi, dword [esp + 0x1c]
push esi
call fcn.00412729
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x406538
inc dword [esp + 0x38]
add dword [esp + 0x40], 0xc
push esi
call fcn.00412447
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x4062f0
cmp eax, 0xffffff9c
je 0x406565
push 0x104
lea ecx, [esp + 0xc0]
push ecx
push eax
call fcn.00412c88
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 8]
add esp, 0xc
push 1
push 0
push 0x14d8
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00414046
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x60]
neg esi
sbb esi, esi
inc esi
test eax, eax
je 0x406597
mov edi, dword [esp + 0x64]
call fcn.00406e60
mov edx, dword [esp + 0x60]
push edx
call fcn.004367bb
add esp, 4
xor eax, eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x54]
push eax
call fcn.004367bb
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x2d8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c0]
xor ecx, esp
call fcn.00443100
mov esp, ebp
pop ebp
ret