Function at 0x4099d6
Capabilities:
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd54
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp dword [edi + 4], ebx
jne 0x4099f3
xor al, al
jmp 0x409c7b
cmp dword [ebp + 0xc], ebx
jne 0x4099fe
lea eax, [edi + 8]
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
call fcn.00409c82
pop ecx
test al, al
je 0x4099ec
lea esi, [ebp - 0x448]
call fcn.004098f8
cmp byte [ebp - 0x218], bl
je 0x409a4a
push ebx
mov eax, esi
push eax
mov eax, edi
add eax, 8
push eax
lea eax, [ebp - 0x550]
push ebx
push eax
call fcn.00418047
add esp, 0x14
lea eax, [ebp - 0x550]
push eax
call fcn.00409c82
pop ecx
jmp 0x409c7b
push 0x103
lea eax, [ebp - 0x20f]
push ebx
push eax
mov byte [ebp - 0x210], bl
call fcn.00416e30
add esp, 0xc
push ebx
lea eax, [ebp - 0x448]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.00418047
lea eax, [ebp - 0x108]
add esp, 0x14
push eax
call fcn.00418067
pop ecx
mov esi, eax
push 0x5c
push esi
call fcn.004180c0
pop ecx
pop ecx
mov byte [ebp + 0xf], bl
cmp eax, ebx
je 0x409aac
push esi
mov byte [eax], bl
call fcn.00409c82
pop ecx
mov byte [ebp + 0xf], al
push esi
call fcn.00417fb9
pop ecx
cmp byte [ebp + 0xf], bl
je 0x4099ec
mov eax, edi
cmp byte [eax + 0x10e], bl
lea eax, [ebp - 0x108]
jne 0x409b6e
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x409bde
mov eax, dword [ebp + 8]
cmp byte [eax + 0x10d], bl
je 0x4099ec
lea eax, [ebp - 0x108]
push eax
mov esi, 0x104
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.00416eb5
add esp, 0xc
push str..tmp
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.004172c8
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x4099ec
push 5
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
jmp 0x409bde
push eax
mov esi, 0x104
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.00416eb5
add esp, 0xc
push str..tmp
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.004172c8
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4099ec
push 5
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x4099ec
mov eax, dword [ebp + 8]
push dword [eax + 4]
call fcn.00414280
test eax, eax
jne 0x4099ec
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
je 0x4099ec
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x800
lea eax, [ebp - 0xd50]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 4]
call fcn.00413bf0
mov edi, eax
cmp edi, ebx
jle 0x409c4b
push ebx
lea eax, [ebp + 0xc]
push eax
push edi
lea eax, [ebp - 0xd50]
push eax
push esi
mov dword [ebp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409c48
cmp dword [ebp + 0xc], edi
je 0x409c0b
or edi, 0xffffffff
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push dword [eax + 4]
call fcn.00413df0
cmp edi, ebx
jne 0x409c74
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp - 0x230]
call fcn.00409cf8
pop ecx
xor eax, eax
cmp edi, ebx
sete al
pop edi
pop esi
pop ebx
leave
ret 8