Function at 0x4094d9
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x21a8
call sub.ntdll.dll__chkstk
push ebx
push ebp
push esi
push edi
xor ebx, ebx
lea eax, [esp + 0x94]
push 0x114
push ebx
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x9c], ebx
call fcn.00402707
push 0x200f
lea eax, [esp + 0x1b9]
mov dword [esp + 0x30], ebx
push ebx
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov byte [esp + 0x1c0], bl
call fcn.00402707
xor eax, eax
mov dword [esp + 0x88], ebx
lea edi, [esp + 0x8c]
stosd dword es:[edi], eax
push 0x27
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00402839
add esp, 0x1c
mov ebp, eax
mov dword [esp + 0x38], ebp
push 5
pop esi
lea eax, [esp + 0x70]
dec esi
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
test eax, eax
jns 0x40956b
test esi, esi
jne 0x409557
test esi, esi
js 0x409ab5
push ebp
lea eax, [esp + 0x74]
push eax
call fcn.0040933a
cmp eax, 0x27
jne 0x409ab5
push ebx
push 0x80000000
push 3
push ebx
push ebx
push 0xc0000000
push dword [esp + 0x21d4]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x409a85
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x409a85
mov eax, dword [esp + 0x14]
or eax, dword [esp + 0x18]
je 0x409a85
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
mov eax, 0x200
mov dword [esp + 0x2c], ebx
cmp ebx, eax
jle 0x4095f4
mov ebx, eax
mov dword [esp + 0x2c], eax
xor eax, eax
mov byte [esp + 0x3c], 0
lea edi, [esp + 0x3d]
mov byte [esp + 0x50], 0
stosd dword es:[edi], eax
push 7
pop ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x90]
push eax
call fcn.00402949
lea eax, [esp + 0x20]
push eax
call fcn.004071e6
push 1
push 6
call fcn.004071c7
push eax
lea eax, [esp + 0x28]
push eax
call fcn.0040723f
mov edi, eax
test edi, edi
jne 0x409a88
xor edx, edx
mov al, byte [esp + 0x14]
mov cl, dl
shl cl, 3
shr al, cl
mov byte [esp + edx + 0x50], al
inc edx
cmp edx, 8
jl 0x40964f
lea eax, [esp + 0x20]
push eax
call fcn.004072f7
push 8
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00407317
push dword [esp + 0x21bc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push dword [esp + 0x21c0]
lea eax, [esp + 0x28]
push eax
call fcn.00407317
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0040733f
push 0x10
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.004026e5
movzx eax, byte [esp + 0x20]
and eax, 0x8000000f
jns 0x4096cf
dec eax
or eax, 0xfffffff0
inc eax
mov dword [esp + 0x40], eax
mov byte [esp + 0x57], al
lea eax, [esp + 0x48]
push 0x10
push eax
lea eax, [esp + 0x94]
push eax
call fcn.004026e5
push 0x20
lea eax, [esp + 0x6c]
push 0
push eax
call fcn.00402707
push 0x10
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x7c]
push eax
call fcn.004026e5
add esp, 0x30
mov edi, 0x2000
lea eax, [esp + 0x20]
push eax
call fcn.004072f7
push 0x20
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00407317
push ebx
push ebp
lea eax, [esp + 0x28]
push eax
call fcn.00407317
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0040733f
dec edi
jne 0x409712
push 0x100
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00402977
push 0x20
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00407386
push 2
xor ebx, ebx
push ebx
push ebx
push esi
call fcn.004092f6
and eax, edx
cmp eax, 0xffffffff
je 0x409ab5
mov edi, 0x200
push edi
call fcn.00402839
push edi
push ebx
push eax
mov dword [esp + 0x20], eax
call fcn.00402707
mov ebp, dword [esp + 0x28]
add esp, 0x10
mov eax, 0xa00000
cmp ebp, ebx
jl 0x4097c9
jg 0x4097bb
mov edi, dword [esp + 0x14]
cmp edi, eax
jbe 0x4097cd
mov edi, eax
mov ebp, ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebp
jmp 0x4097cd
mov edi, dword [esp + 0x14]
push ebx
push 0x2000
push ebp
push edi
call sub.ntdll.dll__allrem
cmp edx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
jl 0x409824
jg 0x4097ea
test eax, eax
je 0x409824
push 0
push 0x2000
push ebp
push edi
call sub.ntdll.dll__alldiv
push 0
push 2
push edx
push eax
call sub.ntdll.dll__allrem
or eax, edx
mov edi, dword [esp + 0x10]
jne 0x409828
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x3c]
movzx eax, al
neg eax
and eax, 0xf
push eax
push edi
push esi
call ebx
jmp 0x409828
mov edi, dword [esp + 0x10]
push dword [esp + 0x2c]
push dword [esp + 0x3c]
push dword [0x40112c]
push dword [esp + 0x21cc]
push edi
call fcn.0040a7fa
test eax, eax
jne 0x409ab5
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push 0
lea eax, [esp + 0x20]
push eax
push 0x80
push edi
push esi
call ebx
push 0
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x21cc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [esp + 0x21d0]
push esi
call ebx
push edi
call fcn.00402825
pop ecx
xor eax, eax
push eax
push eax
push eax
push esi
call fcn.004092f6
mov ebp, dword [esp + 0x18]
test ebp, ebp
jl 0x4098c6
jg 0x4098b5
mov edi, dword [esp + 0x14]
cmp edi, 0xa00000
jbe 0x4098ca
mov edi, 0xa00000
xor ebp, ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebp
jmp 0x4098ca
mov edi, dword [esp + 0x14]
push 0
push 0x2000
push ebp
push edi
call sub.ntdll.dll__alldiv
push 0
push 0x2000
push ebp
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x3c], edx
call sub.ntdll.dll__allrem
push 0
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
push 0x2000
lea eax, [esp + 0x1b4]
mov dword [esp + 0x58], edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
push eax
push eax
push esi
call fcn.004092f6
mov ecx, dword [esp + 0x2c]
xor edi, edi
xor ebp, ebp
test ecx, ecx
jl 0x4099e6
jg 0x40993a
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4099ea
push 0
push 2
push ebp
push edi
call sub.ntdll.dll__allrem
or eax, edx
jne 0x409984
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x94]
push eax
push dword [esp + 0x38]
lea eax, [esp + 0x1b4]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.00409294
push 0
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x38]
lea eax, [esp + 0x1b4]
push eax
push esi
call ebx
jmp 0x4099c4
push 1
push 0
push 0x2000
push esi
call fcn.004092f6
push 0
lea eax, [esp + 0x34]
push eax
push 0x2000
lea eax, [esp + 0x1b4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x30]
xor eax, eax
neg ecx
push 1
adc eax, eax
neg eax
push eax
push ecx
push esi
call fcn.004092f6
mov ecx, dword [esp + 0x2c]
add edi, 1
adc ebp, 0
cmp ebp, ecx
jl 0x40993a
mov eax, dword [esp + 0x10]
jg 0x4099ea
cmp edi, eax
jb 0x40993a
jmp 0x4099ea
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x4c], 0
jl 0x409a3d
mov ebp, dword [esp + 0x34]
jg 0x4099fb
test ebp, ebp
je 0x409a3d
push 0
push 2
push ecx
push eax
call sub.ntdll.dll__allrem
or eax, edx
jne 0x409a3d
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x94]
push eax
push ebp
lea eax, [esp + 0x1b4]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.00409294
push 0
lea eax, [esp + 0x20]
push eax
push ebp
lea eax, [esp + 0x1b4]
push eax
push esi
call ebx
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00407489
push 2
push 0
push 0
push esi
call fcn.004092f6
push 0
lea eax, [esp + 0x20]
push eax
push 0x20
lea eax, [esp + 0x5c]
push eax
push esi
call ebx
push 0
lea eax, [esp + 0x20]
push eax
push 0x10
lea eax, [esp + 0x8c]
push eax
push esi
call ebx
mov ebp, dword [esp + 0x38]
xor edi, edi
jmp 0x409a88
xor edi, edi
inc edi
test esi, esi
je 0x409a93
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.00402825
pop ecx
lea eax, [esp + 0x20]
push eax
call fcn.004071f9
lea eax, [esp + 0x90]
push eax
call fcn.0040295f
mov eax, edi
jmp 0x409ab8
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21a8
ret 0xc