Function at 0x407a70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push 1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x407a8f
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x24], 0xffffffff
jne 0x407a99
mov eax, 9
jmp 0x407d1e
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0
mov eax, dword [ebp + 0x14]
and eax, 1
je 0x407b2a
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x58]
test edx, edx
jne 0x407ae0
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406a80
add esp, 8
mov edx, dword [ebp + 8]
cmp dword [edx + 8], 0
je 0x407ad4
jmp 0x407d0c
mov eax, 1
mov ecx, dword [ebp + 8]
mov word [ecx + 0x58], ax
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00406d80
add esp, 0xc
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0x20], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 8], 0
jne 0x407b12
mov eax, dword [ebp + 8]
cmp dword [eax + 0x8c], 0
jne 0x407b20
xor ecx, ecx
mov edx, dword [ebp + 8]
mov word [edx + 0x58], cx
jmp 0x407d0c
mov eax, 5
jmp 0x407d1e
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
and ecx, 0x10
je 0x407b7d
mov edx, dword [ebp + 0x14]
and edx, 2
je 0x407b76
mov eax, dword [ebp + 0x14]
and eax, 0x80000000
je 0x407b5a
push 1
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00407980
add esp, 8
mov dword [ebp + 0x14], eax
jmp 0x407b6b
push 1
mov edx, dword [ebp + 0xc]
push edx
call fcn.00407850
add esp, 8
mov dword [ebp + 0x14], eax
cmp dword [ebp + 0x14], 0
jne 0x407b76
jmp 0x407c1a
xor eax, eax
jmp 0x407d1e
cmp dword [ebp + 0x14], 4
jne 0x407b8e
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
jmp 0x407c14
mov ecx, dword [ebp + 0x14]
and ecx, 0x80000000
je 0x407bac
push 0
mov edx, dword [ebp + 0xc]
push edx
call fcn.00407980
add esp, 8
mov dword [ebp - 8], eax
jmp 0x407bbd
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00407850
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x407bc5
jmp 0x407c1a
mov ecx, dword [ebp + 0x14]
and ecx, 0x80000000
je 0x407bf3
push 0
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
push eax
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
jmp 0x407c14
push 0
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
push eax
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x407c29
mov edx, dword [ebp + 8]
mov dword [edx + 8], 1
jmp 0x407d0c
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406a80
add esp, 8
mov edx, dword [ebp + 8]
cmp dword [edx + 8], 0
jne 0x407cd4
mov eax, dword [ebp + 8]
cmp dword [eax + 0x34], 0
jne 0x407c75
push 0x4000
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x34], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x34], 0
jne 0x407c75
mov eax, dword [ebp + 8]
mov dword [eax + 8], 2
mov ecx, dword [ebp + 8]
cmp dword [ecx + 8], 0
jne 0x407cd4
push 0x4000
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x34]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406d80
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x407ca1
jmp 0x407cd4
push 0
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x34]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407cc8
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0xc]
je 0x407cd2
mov edx, dword [ebp + 8]
mov dword [edx + 8], 3
jmp 0x407c75
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jne 0x407cfc
mov ecx, dword [ebp + 0x10]
add ecx, 0x18
push ecx
mov edx, dword [ebp + 0x10]
add edx, 8
push edx
mov eax, dword [ebp + 0x10]
add eax, 0x10
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 4
je 0x407d0c
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push eax
call fcn.00406a20
add esp, 4
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 8]
mov esp, ebp
pop ebp
ret