Function at 0x410670
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push 0
push 0
call fcn.004103a8
add esp, 8
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x410718
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jbe 0x410711
mov eax, dword [ebp + 0x14]
cmp eax, 0x40
jbe 0x4106ab
mov dword [ebp - 8], 0x40
jmp 0x4106b1
mov edx, dword [ebp + 0x14]
mov dword [ebp - 8], edx
push dword [ebp - 8]
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00413a20
add esp, 0xc
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
cmp ecx, eax
je 0x4106d6
xor eax, eax
jmp 0x4108a0
mov edx, dword [ebp - 8]
sub dword [ebp + 0x14], edx
mov ecx, dword [ebp - 8]
add dword [ebp + 0x10], ecx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 0x14]
sub eax, edx
imul eax, eax, 0x64
xor edx, edx
div dword [ebp - 0xc]
push eax
push 1
call fcn.004103a8
add esp, 8
mov ecx, dword [0x4d3af4]
mov eax, dword [ecx]
call fcn.0046b1f8
mov edx, dword [ebp + 0x14]
test edx, edx
ja 0x41069a
mov al, 1
jmp 0x4108a0
mov edx, dword [ebp + 0xc]
dec edx
jne 0x4107ad
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp + 0x14]
test eax, eax
jbe 0x4107a6
mov edx, dword [ebp + 0x14]
cmp edx, 0x40
jbe 0x410740
mov dword [ebp - 8], 0x40
jmp 0x410746
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 8], ecx
push dword [ebp - 8]
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0041401c
add esp, 0xc
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
cmp eax, edx
je 0x41076b
xor eax, eax
jmp 0x4108a0
mov edx, dword [ebp - 8]
sub dword [ebp + 0x14], edx
mov ecx, dword [ebp - 8]
add dword [ebp + 0x10], ecx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 0x14]
sub eax, edx
imul eax, eax, 0x64
xor edx, edx
div dword [ebp - 0xc]
push eax
push 1
call fcn.004103a8
add esp, 8
mov ecx, dword [0x4d3af4]
mov eax, dword [ecx]
call fcn.0046b1f8
mov edx, dword [ebp + 0x14]
test edx, edx
ja 0x41072f
mov al, 1
jmp 0x4108a0
mov edx, dword [ebp + 0xc]
cmp edx, 2
jne 0x410804
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc], ecx
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
call sub.KERNEL32.DLL_WriteFile
test eax, eax
je 0x4107e4
mov edx, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
cmp edx, ecx
je 0x4107e4
xor eax, eax
jmp 0x4108a0
push 0x64
push 1
call fcn.004103a8
add esp, 8
mov edx, dword [0x4d3af4]
mov eax, dword [edx]
call fcn.0046b1f8
mov al, 1
jmp 0x4108a0
mov edx, dword [ebp + 0xc]
cmp edx, 3
jne 0x41089e
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp + 0x14]
test eax, eax
jbe 0x41088e
mov edx, dword [ebp + 0x14]
cmp edx, 0x400
jbe 0x410831
mov dword [ebp - 8], 0x400
jmp 0x410837
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 8], ecx
push dword [ebp - 8]
push dword [ebp + 0x10]
push dword [0x4d45d4]
call fcn.004a2250
add esp, 0xc
test al, al
jne 0x410853
xor eax, eax
jmp 0x4108a0
mov edx, dword [ebp - 8]
sub dword [ebp + 0x14], edx
mov ecx, dword [ebp - 8]
add dword [ebp + 0x10], ecx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 0x14]
sub eax, edx
imul eax, eax, 0x64
xor edx, edx
div dword [ebp - 0xc]
push eax
push 1
call fcn.004103a8
add esp, 8
mov ecx, dword [0x4d3af4]
mov eax, dword [ecx]
call fcn.0046b1f8
mov edx, dword [ebp + 0x14]
test edx, edx
ja 0x41081d
push 0x64
push 1
call fcn.004103a8
add esp, 8
mov al, 1
jmp 0x4108a0
xor eax, eax
mov esp, ebp
pop ebp
ret