Function at 0x406ff0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x38
push ebx
push ebp
push edi
mov edi, ecx
push 0x10010
mov dword [esp + 0x10], edi
call sub.MFC42.DLL_operatornew
mov ebx, eax
mov eax, dword [edi + 0xf570]
xor ebp, ebp
add esp, 4
cmp eax, ebp
mov dword [esp + 0x28], eax
jne 0x407023
mov dword [esp + 0x28], 1
mov dword [edi + 0xf548], ebp
cmp ebx, ebp
jne 0x40704e
mov eax, dword [esp + 0x4c]
push eax
call fcn.0043ab80
mov eax, 2
add esp, 4
mov dword [edi + 0xf548], eax
pop edi
pop ebp
pop ebx
add esp, 0x38
ret 8
mov ecx, dword [esp + 0x48]
push ebp
push 0x8000000
push 2
push ebp
push ebp
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x2c], eax
jne 0x40709f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0044c500
mov dword [edi + 0xf548], eax
mov edx, dword [esp + 0x50]
push edx
call fcn.0043ab80
add esp, 8
mov eax, dword [edi + 0xf548]
pop edi
pop ebp
pop ebx
add esp, 0x38
ret 8
cmp dword [esp + 0x4c], ebp
setg al
test al, al
mov byte [esp + 0x48], al
je 0x407126
mov ecx, dword [edi + 0x70]
cmp ecx, 0x3e8
mov dword [esp + 0x30], ecx
jae 0x4070c8
mov byte [esp + 0x48], 0
mov dword [esp + 0x18], ebp
jmp 0x40712a
cmp ecx, 0x2710
jae 0x4070df
mov eax, ecx
mov dword [esp + 0x18], ebp
shr eax, 2
mov dword [esp + 0x14], eax
jmp 0x40712a
cmp ecx, 0xc350
jae 0x4070fb
mov eax, 0xcccccccd
mov dword [esp + 0x18], ebp
mul ecx
shr edx, 3
mov dword [esp + 0x14], edx
jmp 0x40712a
cmp ecx, 0x7a120
mov eax, 0x51eb851f
jae 0x407117
mul ecx
shr edx, 3
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebp
jmp 0x40712a
mul ecx
shr edx, 5
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebp
jmp 0x40712a
mov ecx, dword [esp + 0x30]
mov eax, dword [edi + 4]
push esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x3c], ebp
mov esi, dword [eax + 0x14]
mov eax, dword [edi + 0x70]
test eax, eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], 0
jle 0x40731a
jmp 0x407156
mov ecx, dword [esp + 0x34]
mov al, byte [esp + 0x4c]
test al, al
je 0x4071a5
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
cmp eax, edx
jbe 0x4071a1
fild dword [esp + 0x24]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
fmul qword [0x464c68]
fidiv dword [esp + 0x40]
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0x50]
push eax
push ecx
call fcn.0043ab50
add esp, 8
mov dword [esp + 0x1c], 0
jmp 0x4071a5
inc dword [esp + 0x1c]
test esi, esi
je 0x407262
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov dword [esp + 0x28], edi
lea edx, [edi + ebp]
cmp edx, 0x10000
jbe 0x4071f5
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x38], eax
push eax
lea eax, [esp + 0x3c]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4072ef
cmp dword [esp + 0x38], ebp
jne 0x4072ef
xor ebp, ebp
mov ecx, edi
lea edi, [ebx + ebp]
mov edx, ecx
mov eax, dword [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x28]
add eax, 0xfffffffe
and ecx, 3
add ebp, edx
cmp eax, 4
rep movsb byte es:[edi], byte [esi]
ja case.default.0x40721a
jmp dword [eax*4 + 0x4073f0]
mov byte [ebx + ebp], 0xd
inc ebp
jmp 0x40727d
mov byte [ebx + ebp], 0xa
inc ebp
mov byte [ebx + ebp], 0xd
inc ebp
jmp 0x40727d
mov byte [ebx + ebp], 0xa
inc ebp
mov byte [ebx + ebp], 0xd
inc ebp
mov byte [ebx + ebp], 0xd
inc ebp
jmp 0x40727d
mov byte [ebx + ebp], 0xd
inc ebp
mov byte [ebx + ebp], 0xa
inc ebp
mov byte [ebx + ebp], 0xa
inc ebp
jmp 0x40727d
mov byte [ebx + ebp], 0xd
inc ebp
mov byte [ebx + ebp], 0xa
inc ebp
jmp 0x40727d
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
xor eax, eax
mov edi, dword [ecx + 0x14]
or ecx, 0xffffffff
add edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x20]
xor esi, esi
cmp ecx, esi
je 0x4072cb
mov edx, dword [ecx + 8]
mov eax, dword [esp + 0x3c]
add eax, edx
mov edx, dword [esp + 0x24]
inc edx
cmp edx, eax
jl 0x4072aa
mov dword [esp + 0x3c], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], esi
jmp 0x4072ba
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
lea eax, [ecx + edx + 1]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
cmp eax, esi
je 0x4072cb
mov esi, dword [eax + 0x14]
mov eax, dword [esp + 0x14]
add esi, eax
mov eax, dword [esp + 0x10]
mov cl, byte [eax + 0xf582]
test cl, cl
jne 0x407316
mov ecx, dword [esp + 0x24]
mov edx, dword [eax + 0x70]
inc ecx
cmp ecx, edx
mov dword [esp + 0x24], ecx
jl 0x407152
jmp 0x407316
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0044c500
mov ecx, dword [esp + 0x14]
add esp, 4
test eax, eax
mov dword [ecx + 0xf548], eax
jne 0x407316
mov dword [ecx + 0xf548], 0x1a
mov edi, dword [esp + 0x10]
mov al, byte [edi + 0xf582]
pop esi
test al, al
jne 0x40739e
test ebp, ebp
jbe 0x40739e
mov eax, dword [edi + 0xf548]
test eax, eax
jne 0x40739e
mov ecx, dword [esp + 0x28]
lea eax, [ecx - 1]
cmp eax, 5
ja case.default.0x40733f
jmp dword [eax*4 + 0x407404]
dec ebp
jmp case.default.0x40733f
sub ebp, 2
jmp case.default.0x40733f
sub ebp, 3
test ebp, ebp
mov dword [esp + 0x48], 0
jbe 0x40739e
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x48]
push 0
push edx
push ebp
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40737b
cmp dword [esp + 0x48], ebp
je 0x40739e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0044c500
add esp, 4
mov dword [edi + 0xf548], eax
test eax, eax
jne 0x40739e
mov dword [edi + 0xf548], 0x1a
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call sub.MFC42.DLL_operatordelete
mov edx, dword [esp + 0x50]
push edx
call fcn.0043ab80
add esp, 8
mov eax, dword [edi + 0xf548]
cmp eax, 0xffffffff
jne 0x4073d8
xor eax, eax
mov dword [edi + 0xf548], eax
pop edi
pop ebp
pop ebx
add esp, 0x38
ret 8
mov eax, dword [edi + 0xf548]
mov dword [edi + 0xf548], eax
pop edi
pop ebp
pop ebx
add esp, 0x38
ret 8