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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x485cfd
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x499100]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
or esi, 0xffffffff
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x8c], edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x3c], esi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push eax
mov byte [ebp - 4], 2
call ebx
cmp eax, esi
je 0x411093
mov esi, eax
mov dword [ebp - 0x68], esi
test eax, eax
je 0x411093
mov al, 1
jmp 0x411095
xor al, al
test al, al
je 0x4114ad
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push edi
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x41164e
mov dword [ebp - 0x3c], edi
test edi, edi
je 0x41164e
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
je 0x4114c4
push 0
lea eax, [ebp - 0x38]
push eax
push 0x18
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x411631
cmp dword [ebp - 0x38], 0x18
jne 0x411631
lea ecx, [ebp - 0x2c]
mov edx, 0x489080
mov ebx, 0xc
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x411616
add ecx, 4
add edx, 4
sub ebx, 4
jae 0x411110
mov bl, byte [ebp - 0x15]
mov al, bl
and al, 0x7f
movzx eax, al
cdq
mov ecx, eax
movzx eax, byte [ebp - 0x16]
shld edx, ecx, 8
shl ecx, 8
mov dword [ebp - 0x30], edx
cdq
add ecx, eax
mov eax, dword [ebp - 0x30]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x30], eax
shl ecx, 8
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x18]
movzx eax, ch
cdq
add dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
adc dword [ebp - 0x30], edx
shld dword [ebp - 0x30], eax, 8
shl eax, 8
mov dword [ebp - 0x34], eax
movzx eax, cl
mov ecx, dword [ebp - 0x34]
cdq
add ecx, eax
mov eax, dword [ebp - 0x30]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x30], eax
movzx eax, byte [ebp - 0x19]
cdq
shl ecx, 8
add ecx, eax
mov eax, dword [ebp - 0x30]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x30], eax
movzx eax, byte [ebp - 0x1a]
cdq
shl ecx, 8
add ecx, eax
mov eax, dword [ebp - 0x30]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x30], eax
movzx eax, byte [ebp - 0x1b]
cdq
shl ecx, 8
add ecx, eax
mov eax, dword [ebp - 0x30]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x30], eax
movzx eax, byte [ebp - 0x1c]
cdq
shl ecx, 8
add ecx, eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], ecx
adc eax, edx
mov dword [ebp - 0x30], eax
test bl, bl
jns 0x4111ed
neg ecx
mov dword [ebp - 0x34], ecx
adc eax, 0
neg eax
mov dword [ebp - 0x30], eax
test eax, eax
jl 0x4115fb
jg 0x4111ff
test ecx, ecx
jb 0x4115fb
cmp eax, 7
jg 0x4115fb
jl 0x411213
cmp ecx, 0xffffffff
jae 0x4115fb
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
push ecx
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 4
call fcn.00411990
mov dword [ebp - 4], 3
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov ebx, dword [ebp - 0x40]
lea ecx, [ebp - 0x4c]
add ebx, 0xffffffe8
mov byte [ebp - 4], 7
push ebx
call fcn.00411990
push 0
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 6
push eax
push ebx
push dword [ebp - 0x4c]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4114db
cmp dword [ebp - 0x38], ebx
jne 0x4114f2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x40], ebx
cmp ebx, 0xffffffff
je 0x411507
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
push ebx
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0xa
call fcn.00411990
push 0
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 9
push eax
push ebx
mov ebx, dword [ebp - 0x58]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41151e
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x38], eax
jne 0x411535
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x48]
sub edx, ebx
sub ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x64]
sub eax, ebx
push edx
push dword [ebp - 0x58]
push ecx
push dword [ebp - 0x4c]
push eax
push ebx
push dword [ebp - 0x88]
call fcn.00424890
mov ebx, dword [ebp - 0x34]
add esp, 0x1c
xor ecx, ecx
cmp eax, ebx
jne 0x41158f
cmp ecx, dword [ebp - 0x30]
jne 0x41158f
push eax
call fcn.00423ee0
add esp, 4
test eax, eax
jne 0x41158f
test edi, edi
je 0x41135c
cmp edi, 0xffffffff
je 0x411355
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x3c], 0
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0x8c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00410fe0
mov edi, dword [ebp - 0x3c]
test edi, edi
je 0x411572
cmp edi, 0xffffffff
je 0x411572
push 0
lea eax, [ebp - 0x90]
push eax
push ebx
push dword [ebp - 0x64]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411555
xor eax, eax
cmp dword [ebp - 0x90], ebx
jne 0x411555
cmp eax, dword [ebp - 0x30]
jne 0x411555
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x4113fb
mov edx, dword [ebp - 0x50]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4113f1
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x411550
push edx
push ecx
call fcn.0046a9b7
add esp, 8
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x41142f
mov edx, dword [ebp - 0x44]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x411425
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x411550
push edx
push ecx
call fcn.0046a9b7
add esp, 8
mov ecx, dword [ebp - 0x64]
test ecx, ecx
je 0x411463
mov edx, dword [ebp - 0x5c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x411459
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x411550
push edx
push ecx
call fcn.0046a9b7
add esp, 8
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x411475
cmp edi, 0xffffffff
je 0x411475
push edi
call ebx
test esi, esi
je 0x411481
cmp esi, 0xffffffff
je 0x411481
push esi
call ebx
xor eax, eax
jmp 0x411491
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0046ae1f
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x6c]
push 0x496098
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x70]
push 0x496098
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x74]
push 0x496098
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x78]
mov dword [ebp - 0x78], 0xffffffff
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x7c]
push 0x496098
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0x80]
push 0x496098
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x84]
mov dword [ebp - 0x84], 0xffffffff
push eax
call fcn.0046c260
call fcn.0046e58f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x94]
push 0x496098
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x98]
push 0x496098
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0xfffffff7
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0xa0]
mov dword [ebp - 0xa0], 0xffffffff
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], 0xffffffff
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa8], 0xffffffff
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0xac]
mov dword [ebp - 0xac], 0xfffffffb
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0xfffffffc
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0xb4]
push 0x496098
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb8]
push 0x496098
push eax
call fcn.0046c260
int3