Function at 0x409a92
Capabilities:
Get file size
Write file on windows

Disassembly:
lea eax, [ebp - 8]
lea edx, [ebp - 0x124]
mov ecx, 0x104
call fcn.00403374
test byte [ebp - 0x150], 0x10
je 0x40968c
mov eax, dword [ebp - 8]
mov edx, 0x409bd8
call fcn.004034d8
je 0x409b52
mov eax, dword [ebp - 8]
mov edx, 0x409be4
call fcn.004034d8
je 0x409b52
push dword [ebp - 4]
push dword [ebp - 8]
push 0x409bf0
lea eax, [ebp - 0x158]
mov edx, 3
call fcn.0040344c
mov eax, dword [ebp - 0x158]
call fcn.004095b8
jmp 0x409b52
mov eax, 0x41ab68
mov edx, 0x409bfc
call fcn.0040325c
cmp word [0x4191f4], 0
jne 0x4096ab
inc dword [0x41ab8c]
mov eax, dword [0x41ab8c]
cmp eax, dword [0x41ab88]
jl 0x409b52
lea eax, [ebp - 0x15c]
push eax
mov eax, dword [ebp - 8]
call fcn.0040338c
mov edx, eax
sub edx, 2
mov ecx, 3
mov eax, dword [ebp - 8]
call fcn.004035e4
mov eax, dword [ebp - 0x15c]
lea edx, [ebp - 0xc]
call fcn.00404964
mov edx, dword [0x41ab5c]
mov eax, dword [ebp - 0xc]
call fcn.00403624
test eax, eax
je 0x409701
mov bl, 3
jmp 0x409703
mov bl, 1
mov eax, 0x41ab68
mov edx, 0x409cd8
call fcn.0040325c
cmp bl, 3
jne 0x4097db
mov eax, dword [0x41ab58]
call fcn.0040338c
test eax, eax
jne 0x409730
mov bl, 2
jmp 0x4097db
mov edi, dword [ebp - 0x130]
cmp edi, 0x9600000
jbe 0x409745
mov bl, 2
jmp 0x4097db
mov eax, dword [ebp - 0xc]
mov edx, 0x409da4
call fcn.004034d8
jne 0x409784
cmp edi, 0x7530
jae 0x409760
mov bl, 2
jmp 0x4097db
lea eax, [ebp - 0x160]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004033d8
mov eax, dword [ebp - 0x160]
call fcn.00404c54
test al, al
jne 0x4097db
mov bl, 2
jmp 0x4097db
mov edx, dword [ebp - 8]
mov eax, dword [0x41adbc]
call fcn.00403624
test eax, eax
je 0x4097db
mov edx, dword [ebp - 8]
mov eax, dword [0x41adc0]
call fcn.00403624
test eax, eax
jne 0x4097db
mov edx, dword [ebp - 8]
mov eax, dword [0x41adc4]
call fcn.00403624
test eax, eax
jne 0x4097db
mov edx, dword [ebp - 8]
mov eax, dword [0x41adc8]
call fcn.00403624
test eax, eax
jne 0x4097db
mov edx, dword [ebp - 8]
mov eax, dword [0x41adcc]
call fcn.00403624
test eax, eax
jne 0x4097db
mov bl, 2
cmp bl, 3
jne 0x409872
inc word [0x4191f4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00408da0
test al, al
je 0x409828
mov eax, 0x41ab6c
mov edx, dword [ebp - 4]
call fcn.0040325c
lea eax, [ebp - 0x164]
mov ecx, 0x409bf0
mov edx, dword [0x41ab54]
call fcn.004033d8
mov eax, dword [ebp - 0x164]
call fcn.004095b8
push dword [0x41ab38]
push 0x409db0
lea edx, [ebp - 0x16c]
movzx eax, word [0x4191f4]
call fcn.004048e0
push dword [ebp - 0x16c]
push 0x409dbc
lea eax, [ebp - 0x168]
mov edx, 4
call fcn.0040344c
mov eax, dword [ebp - 0x168]
call fcn.00404e0c
dec word [0x4191f4]
mov eax, 0x41ab68
mov edx, 0x409dcc
call fcn.0040325c
xor eax, eax
cmp bl, 1
jne 0x409afc
cmp dword [0x41ab98], 0x64
setl dl
sub dl, 1
jb 0x4098dd
jne 0x4098f0
mov edx, dword [0x41acc8]
mov eax, dword [ebp - 0xc]
call fcn.00403624
test eax, eax
jle 0x4098b3
mov al, 1
jmp 0x4098f0
mov edx, dword [0x41acc4]
mov eax, dword [ebp - 0xc]
call fcn.00403624
test eax, eax
jle 0x4098c9
xor eax, eax
jmp 0x4098f0
cmp dword [ebp - 0x130], 0xa00000
ja 0x4098d9
mov al, 1
jmp 0x4098f0
xor eax, eax
jmp 0x4098f0
mov edx, dword [0x41acc8]
mov eax, dword [ebp - 0xc]
call fcn.00403624
test eax, eax
setg al
test al, al
je 0x409afc
lea eax, [ebp - 0x170]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004033d8
mov eax, dword [ebp - 0x170]
lea edx, [ebp - 0x10]
call fcn.00407a88
mov eax, dword [ebp - 0x10]
call fcn.0040338c
test eax, eax
jle 0x409afc
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
mov eax, dword [0x41ab28]
call fcn.0040358c
push eax
call sub.kernel32.dll_CreateFileA
mov dword [0x41abb4], eax
push 2
push 0
push 0
mov eax, dword [0x41abb4]
push eax
call sub.kernel32.dll_SetFilePointer
push 0
mov eax, dword [0x41abb4]
push eax
call sub.kernel32.dll_GetFileSize
mov dword [0x41ab9c], eax
cmp dword [0x41ab9c], 0xed800
jle 0x409a3d
push 0x409e4c
lea edx, [ebp - 0x178]
mov eax, dword [0x41ab9c]
call fcn.004048e0
push dword [ebp - 0x178]
push 0x409e60
lea edx, [ebp - 0x17c]
mov eax, 0xed800
call fcn.004048e0
push dword [ebp - 0x17c]
lea eax, [ebp - 0x174]
mov edx, 4
call fcn.0040344c
mov eax, dword [ebp - 0x174]
call fcn.0040ffd8
push 0xc8
mov ecx, dword [0x41ad4c]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00406004
push 0x409e6c
mov ecx, dword [0x41ad18]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00405f14
push 0
mov ecx, dword [0x41ad20]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00406004
push 0
mov ecx, dword [0x41ad1c]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00406004
call fcn.0040309c
cmp word [0x4191f4], 0
jne 0x409a69
push 0x409e78
push dword [ebp - 4]
push dword [ebp - 8]
push 0x409e78
push dword [ebp - 0x10]
lea eax, [ebp - 0x10]
mov edx, 5
call fcn.0040344c
jmp 0x409ab4
push 0x409e78
lea edx, [ebp - 0x180]
movzx eax, word [0x4191f4]
call fcn.004048e0
push dword [ebp - 0x180]
push 0x409e84
push dword [0x41ab6c]
push dword [0x41ab64]
xor eax, 0x41ab64
push 0x409e90
push dword [ebp - 8]
push 0x409e78
push dword [ebp - 0x10]
lea eax, [ebp - 0x10]
mov edx, 9
call fcn.0040344c
push 0
push 0x41aba4
mov eax, dword [ebp - 0x10]
call fcn.0040338c
push eax
lea eax, [ebp - 0x10]
call fcn.004035dc
push eax
mov eax, dword [0x41abb4]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, 0x41ab68
mov edx, 0x409e9c
call fcn.0040325c
mov eax, dword [0x41abb4]
push eax
call sub.kernel32.dll_CloseHandle
lea eax, [ebp - 0x10]
xor edx, edx
call fcn.0040366c
cmp word [0x4191f4], 0
jne 0x409b43
mov ecx, dword [0x41ab8c]
mov edx, dword [0x41ad20]
mov eax, dword [0x41abc4]
call fcn.004061f0
lea eax, [ebp - 0x184]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004033d8
mov ecx, dword [ebp - 0x184]
mov edx, dword [0x41ad18]
mov eax, dword [0x41abc4]
call fcn.00406144
mov eax, 0x41ab68
mov edx, 0x409ec4
call fcn.0040325c
lea eax, [ebp - 0x150]
push eax
push esi
call sub.kernel32.dll_FindNextFileA
test eax, eax
jne 0x40961f
mov eax, 0x41ab68
mov edx, 0x409f40
call fcn.0040325c
push esi
call sub.kernel32.dll_FindClose
mov eax, 0x41ab68
mov edx, 0x409f98
call fcn.0040325c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409bbd
lea eax, [ebp - 0x184]
mov edx, 0xd
call fcn.0040322c
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.0040322c
ret