Function at 0x406bc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x49c
mov eax, dword [0x445004]
xor eax, esp
mov dword [esp + 0x498], eax
push ebx
push esi
mov esi, ecx
lea ecx, [esp + 0x34]
push edi
mov dword [esp + 0x20], esi
lea ebx, [esi + 8]
push ebx
mov dword [esp + 0x28], ebx
call fcn.00401d00
mov eax, dword [ebx]
mov eax, dword [eax + 4]
test byte [eax + ebx + 0xc], 6
jne 0x406c18
mov ecx, dword [eax + ebx + 0x38]
lea edx, [esp + 0x68]
push 2
push 1
push 0
mov eax, dword [ecx]
push 0
push edx
call dword [eax + 0x28]
jmp 0x406c32
mov eax, dword [0x435170]
xorps xmm0, xmm0
mov dword [esp + 0x68], eax
mov eax, dword [0x435174]
mov dword [esp + 0x6c], eax
movups xmmword [esp + 0x70], xmm0
lea ecx, [esp + 0x38]
call fcn.00401c90
mov eax, dword [esp + 0x68]
add eax, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx]
push 0xa
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00405ac0
push ebx
lea ecx, [esp + 0x44]
mov byte [esp + 0x13], al
call fcn.00401d00
cmp byte [esp + 0x44], 0
je 0x406cac
mov ecx, dword [ebx]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + ebx + 0x38]
mov eax, dword [ecx + 0x20]
cmp dword [eax], 0
je 0x406c9c
mov edx, dword [ecx + 0x30]
mov eax, dword [edx]
test eax, eax
jle 0x406c9c
dec eax
mov dword [edx], eax
mov ecx, dword [ecx + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov al, byte [esp + 0xf]
mov byte [edx], al
movzx eax, al
jmp 0x406ca7
movzx eax, byte [esp + 0xf]
mov edx, dword [ecx]
push eax
call dword [edx + 0xc]
cmp eax, 0xffffffff
jne 0x406cc2
mov eax, dword [ebx]
push 0
mov ecx, dword [eax + 4]
mov eax, dword [ecx + ebx + 0xc]
add ecx, ebx
or eax, 4
push eax
call fcn.004019d0
lea ecx, [esp + 0x40]
call fcn.00401c90
mov ecx, ebx
call fcn.00403890
lea eax, [esp + 0x88]
push eax
lea ecx, [esi + 0xc]
call fcn.00405730
mov eax, dword [0x4483f8]
test eax, eax
je 0x406d14
lea ecx, [esp + 0x88]
push ecx
push dword [esi + 0xa0]
push dword [esi + 0xa8]
push dword [esi + 0xa4]
push dword [esi]
call eax
add esp, 0x14
test al, al
jne 0x407000
cmp dword [esi], 2
jl 0x406d62
cmp dword [esp + 0x9c], 0x10
lea edi, [esp + 0x88]
mov esi, dword [esp + 0x98]
cmovae edi, dword [esp + 0x88]
push 2
call fcn.0041e903
add esp, 4
push eax
push 1
push esi
push edi
call fcn.0041f7cd
push 2
call fcn.0041e903
add esp, 0x14
push eax
call fcn.0041eccc
mov esi, dword [esp + 0x24]
add esp, 4
call fcn.004069b0
test al, al
je 0x406d9d
cmp dword [esp + 0x9c], 0x10
lea ecx, [esp + 0x5c]
push 0
push ecx
push dword [esp + 0xa0]
lea eax, [esp + 0x94]
cmovae eax, dword [esp + 0x94]
push eax
push dword [0x4483fc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esi], 3
jne 0x407000
mov eax, dword [0x448420]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x406ea0
cmp dword [esp + 0x9c], 0x10
lea ecx, [esp + 0x88]
mov eax, dword [eax]
cmovae ecx, dword [esp + 0x88]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x98]
push 0x4cf434fa
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x14], eax
lea edi, [ecx + 1]
mov ecx, eax
push edi
call fcn.00412640
mov ecx, dword [esp + 0x10]
mov edx, eax
mov dword [esp + 0x14], edx
mov ecx, dword [ecx + 0x1c]
test edx, edx
je 0x406e10
test ecx, ecx
je 0x406e1f
mov edx, dword [ecx]
push edi
call dword [edx + 0x10]
jmp 0x406e1b
test ecx, ecx
je 0x406e1f
mov eax, dword [ecx]
push 0
call dword [eax + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx]
mov dword [esp + 0x10], ecx
cmp edx, 0x30
je 0x406e73
cmp edx, 0x40
jb 0x406e73
test dl, 7
jne 0x406e73
add edi, 0x10
lea eax, [edi + edx]
cmp eax, dword [ecx + 0xc]
ja 0x406e73
mov ecx, dword [ecx + 4]
add ecx, edx
cmp dword [ecx + 4], 0xc8799269
jne 0x406e73
cmp dword [ecx], edi
jb 0x406e73
mov eax, dword [ecx]
mov edi, dword [esp + 0x10]
add eax, edx
cmp eax, dword [edi + 0xc]
ja 0x406e73
mov eax, dword [ecx + 8]
cmp eax, 0x4cf434fa
jne 0x406e73
mov ecx, dword [edi + 4]
add ecx, edx
jmp 0x406e75
xor ecx, ecx
lea eax, [ecx + 0x10]
neg ecx
sbb ecx, ecx
and ecx, eax
je 0x406ea0
push dword [esp + 0x28]
push dword [esp + 0x1c]
push ecx
call fcn.00419e20
mov eax, dword [esp + 0x28]
add esp, 0xc
push dword [esp + 0x14]
mov ecx, dword [eax]
call fcn.004127f0
mov eax, dword [esp + 0x98]
mov ecx, 0x400
cmp eax, ecx
mov dword [esp + 0x60], 0x400
cmovb ecx, eax
cmp dword [esp + 0x9c], 0x10
lea eax, [esp + 0x88]
cmovae eax, dword [esp + 0x88]
push ecx
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.00419e20
add esp, 0xc
lea eax, [esp + 0xa0]
push eax
call fcn.0040c800
mov eax, dword [0x448404]
add esp, 4
sub eax, 0
je 0x407066
sub eax, 1
je 0x406f17
cmp dword [0x448404], 0
sete al
test al, al
jne 0x407066
call fcn.004073d0
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 0xc]
je 0x407066
call fcn.004073d0
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x406f37
mov ecx, dword [eax + 4]
mov eax, dword [eax]
dec ecx
mov ecx, dword [eax + ecx*4]
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x407000
mov eax, 1
lock xadd dword [ecx], eax
cmp dword [esp + 0x9c], 0x10
lea ecx, [esp + 0x88]
mov eax, dword [esi + 0xa0]
lea ebx, [esp + 0x88]
cmovae ecx, dword [esp + 0x88]
cmovae ebx, dword [esp + 0x88]
lea esi, [eax + ecx]
mov ecx, dword [esp + 0x2c]
mov edi, ecx
sub edi, eax
lea eax, [ebx + ecx]
push eax
lea ecx, [esp + 0x84]
call fcn.00404440
mov ebx, dword [esp + 0x18]
mov ecx, dword [eax]
mov dword [esp + 0x48], ecx
mov eax, dword [eax + 4]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x20]
mov dword [esp + 0x54], edi
mov eax, dword [esi + 0xa8]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0xa4]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [ebx + 4]
push ebx
call eax
add esp, 0x14
or eax, 0xffffffff
lock xadd dword [ebx], eax
cmp eax, 1
jne 0x406ffc
mov eax, dword [ebx + 8]
push ebx
call eax
add esp, 4
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x9c]
cmp eax, 0x10
jb 0x40703e
mov ecx, dword [esp + 0x88]
inc eax
cmp eax, 0x1000
jb 0x407035
test cl, 0x1f
jne 0x407079
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x407079
sub ecx, eax
cmp ecx, 4
jb 0x407079
cmp ecx, 0x23
ja 0x407079
mov ecx, eax
push ecx
call fcn.00415ffb
add esp, 4
push dword [esi + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, ebx
call fcn.00404a10
mov ecx, dword [esp + 0x4a4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00415d55
mov esp, ebp
pop ebp
ret
cmp byte [0x448460], 0
jne 0x407072
int3
push 1
call fcn.0041ff51
call fcn.0041cdf3
int3