Function at 0x1004a150
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x100a16bc
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x100d1040]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100d1040]
xor eax, esp
push eax
lea eax, [esp + 0x254]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x264]
xor ebp, ebp
xor eax, eax
mov word [esp + 0x34], ax
mov edi, ecx
mov eax, ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x1004a1b2
sub eax, edx
sar eax, 1
push eax
push ebx
lea esi, [esp + 0x38]
call fcn.10002580
mov ecx, esi
push ecx
add edi, 0x54
push edi
mov dword [esp + 0x264], ebp
call fcn.100122e0
cmp dword [esp + 0x48], 8
jb 0x1004a1f3
mov edx, dword [esp + 0x34]
push edx
call fcn.10057104
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebp
push ebp
push 3
push ebp
mov ebp, 1
push ebp
push 0xc0000000
push ebx
call edi
mov esi, eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x25c], ebp
cmp esi, 0xffffffff
jne 0x1004a281
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x1004a254
cmp eax, 0x20
je 0x1004a254
cmp eax, 0xa7
je 0x1004a254
cmp eax, 0x21
je 0x1004a254
cmp eax, 0x13
je 0x1004a254
test eax, eax
jle 0x1004a24d
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x1004a566
push 0
push 0
push 3
push 0
push ebp
push closesocket
push ebx
call edi
mov esi, eax
mov dword [esp + 0x14], esi
cmp eax, 0xffffffff
jne 0x1004a27a
call fcn.10002c20
jmp 0x1004a571
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x14], ebp
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1004a2ad
call fcn.10002c20
mov edi, eax
cmp esi, 0xffffffff
je 0x1004a56f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1004a56f
push 0x1ff
lea edx, [esp + 0x51]
push 0
push edx
mov byte [esp + 0x58], 0
call fcn.10059a00
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xc
push 0
lea eax, [esp + 0x24]
push eax
push 0x200
lea ecx, [esp + 0x58]
push ecx
push esi
mov dword [esp + 0x34], 0
call ebp
test eax, eax
je 0x1004a291
mov eax, 0x15
mov ecx, 0x100c86b4
lea edx, [esp + 0x4c]
lea ebx, [ebx]
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x1004a40a
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x1004a300
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1004a40a
cmp dword [esp + 0x28], 0
mov eax, dword [esp + 0x24]
jl 0x1004a34c
jg 0x1004a336
cmp eax, 0x100000
jb 0x1004a34c
cmp esi, 0xffffffff
je 0x1004a342
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x1004a571
inc eax
push 0x100d61b4
push eax
call fcn.10057582
mov edi, eax
add esp, 8
mov dword [esp + 0x18], edi
mov byte [esp + 0x25c], 2
test edi, edi
jne 0x1004a383
cmp esi, 0xffffffff
je 0x1004a379
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x1004a571
mov ecx, dword [esp + 0x24]
inc ecx
push ecx
push 0
push edi
call fcn.10059a00
add esp, 0xc
xor ecx, ecx
push ecx
push ecx
push ecx
xor eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1004a3ca
call fcn.10002c20
push edi
mov ebx, eax
call fcn.1005758d
add esp, 4
cmp esi, 0xffffffff
je 0x1004a3c3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x1004a571
mov eax, dword [esp + 0x24]
push 0
lea edx, [esp + 0x24]
push edx
push eax
push edi
push esi
call ebp
test eax, eax
je 0x1004a3a7
mov ecx, dword [esp + 0x1c]
push 0
push ebx
push edi
push ecx
call fcn.1004a5a0
push edi
mov ebx, eax
call fcn.1005758d
add esp, 4
cmp esi, 0xffffffff
je 0x1004a3c3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x1004a571
mov eax, dword [esp + 0x4c]
cmp eax, 0x44574f43
jne 0x1004a42b
cmp esi, 0xffffffff
je 0x1004a421
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0033001
jmp 0x1004a571
cmp eax, 0x564d444b
je 0x1004a448
cmp esi, 0xffffffff
je 0x1004a43e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe00e1001
jmp 0x1004a571
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push 0
push 0x200
push edx
push eax
call fcn.1009f830
or eax, edx
je 0x1004a478
cmp esi, 0xffffffff
je 0x1004a46e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe003300c
jmp 0x1004a571
mov ecx, dword [esp + 0x68]
or ecx, dword [esp + 0x6c]
jne 0x1004a498
cmp esi, 0xffffffff
je 0x1004a48e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0033005
jmp 0x1004a571
cmp word [esp + 0x99], 0
je 0x1004a4b6
lea esi, [esp + 0x14]
call fcn.1000fcc0
mov eax, 0xe0033003
jmp 0x1004a571
mov edi, dword [esp + 0x70]
shl edi, 9
push 0x100d61b4
push edi
call fcn.10057582
mov ebp, eax
add esp, 8
mov dword [esp + 0x18], ebp
mov byte [esp + 0x25c], 3
test ebp, ebp
jne 0x1004a4f6
lea esi, [esp + 0x18]
call fcn.1004b720
lea esi, [esp + 0x14]
call fcn.1000fcc0
mov eax, 0x8007000e
jmp 0x1004a571
push edi
push 0
push ebp
call fcn.10059a00
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
add esp, 0xc
push 0
push 0x200
push edx
push eax
call fcn.10065760
push 0
push 0
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1004a530
call fcn.10002c20
jmp 0x1004a55b
push 0
lea ecx, [esp + 0x24]
push ecx
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004a529
lea esi, [esp + 0x14]
call fcn.1001aac0
mov edx, dword [esp + 0x1c]
push 1
push ebx
push ebp
push edx
call fcn.1004a5a0
lea esi, [esp + 0x18]
mov edi, eax
call fcn.1004b720
lea esi, [esp + 0x14]
call fcn.1000fcc0
mov eax, edi
mov ecx, dword [esp + 0x254]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.1005710f
add esp, 0x24c
ret 4