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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101e69d7
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x150
mov eax, dword [0x10275008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
xor ecx, ecx
mov edi, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x148], edi
mov dword [ebp - 0x130], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov dword [ebp - 0x138], edi
mov dword [ebp - 0x144], eax
mov word [edi], cx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x130], 1
cmp dword [eax + 0x34], ecx
je 0x1002e8cf
cmp dword [eax + 0x1c], ecx
je 0x1002e8cf
cmp dword [eax + 0x4c], ecx
je 0x1002e8cf
push ecx
lea esi, [eax + 0xc]
push 0x1023aefc
mov ecx, esi
call fcn.100dc840
cmp eax, 0xffffffff
jne 0x1002e669
mov ecx, esi
call fcn.100fc040
cmp eax, 0xffffffff
setne al
jmp 0x1002e6a6
lea ecx, [ebp - 0x128]
call fcn.100f0960
mov dword [ebp - 4], 1
lea edx, [ebp - 0x128]
mov ecx, esi
call fcn.100f0e40
mov byte [ebp - 0x131], al
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x100]
call fcn.10005300
mov al, byte [ebp - 0x131]
test al, al
je 0x1002e8cf
push 4
mov dword [ebp - 0x12c], 0
call fcn.101c838c
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 3
mov dword [eax], 0
mov dword [eax], 0xffffffff
mov byte [ebp - 4], 0
mov dword [ebp - 0x12c], eax
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x12c]
push 1
push 3
push 1
push SysReAllocString
push esi
call fcn.100dd330
test al, al
je 0x1002e8c0
mov esi, dword [ebp - 0x12c]
test esi, esi
je 0x1002e8c0
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x1002e8c0
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x13c], eax
cmp eax, 0xffffffff
jne 0x1002e745
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1002e8c0
mov ecx, dword [ebp - 0x18]
xor eax, eax
add eax, dword [ebp - 0x13c]
mov dword [ebp - 0x140], eax
adc ecx, 0
mov dword [ebp - 0x18], ecx
jne 0x1002e8c0
cmp eax, 0x500000
ja 0x1002e8c0
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x20], xmm0
call fcn.101c8844
add esp, 4
mov dword [ebp - 0x20], 0
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
push dword [ebp - 0x148]
push eax
call fcn.10030f90
mov byte [ebp - 4], 5
xor ecx, ecx
mov eax, dword [ebp - 0x140]
or eax, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x13c], ecx
je 0x1002e806
mov edi, dword [ebp - 0x140]
nop dword [eax + eax]
mov dword [ebp - 0x54], 0
add eax, ecx
je 0x1002e800
cmp dword [esi], 0xffffffff
je 0x1002e800
push 0
lea ecx, [ebp - 0x54]
push ecx
push edi
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002e800
mov ecx, dword [ebp - 0x13c]
add ecx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x13c], ecx
cmp edi, ecx
jne 0x1002e7c0
cmp dword [ebp - 0x18], 0
jne 0x1002e7c0
mov edi, dword [ebp - 0x138]
mov edx, dword [ebp - 0x144]
lea ecx, [ebp - 0x50]
push 0
add edx, 0x24
call fcn.100e2cb0
add esp, 4
mov byte [ebp - 4], 6
lea eax, [ebp - 0x50]
cmp dword [ebp - 0x3c], 0x10
mov edx, dword [ebp - 0x140]
cmovae eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x20]
push eax
call fcn.10029b10
add esp, 4
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x1002e8f5
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x3c]
cmp edx, 0x10
jb 0x1002e882
mov ecx, dword [ebp - 0x50]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002e878
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002e878
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.101c8702
add esp, 8
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0xf
mov byte [ebp - 0x50], 0
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x1002e8c0
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x1002e8c0
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x1002e8c0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x12c]
call fcn.100dd2c0
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.101c837b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
mov edx, dword [ebp - 0x144]
lea ecx, [ebp - 0x6c]
push 0
lea edx, [edx + 0x3c]
call fcn.100e2cb0
add esp, 4
mov byte [ebp - 4], 7
lea eax, [ebp - 0x6c]
cmp dword [ebp - 0x58], 0x10
mov edx, dword [ebp - 0x20]
cmovae eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x18]
sub edx, ecx
add edx, dword [ebp - 0x140]
push eax
call fcn.10029b10
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x1002e9c3
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x58]
cmp edx, 0x10
jb 0x1002e975
mov ecx, dword [ebp - 0x6c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002e96b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002e96b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.101c8702
add esp, 8
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0xf
mov byte [ebp - 0x6c], 0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x3c]
cmp edx, 0x10
jb 0x1002e882
mov ecx, dword [ebp - 0x50]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002e878
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002e878
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x40]
sub ecx, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
add edx, dword [ebp - 0x40]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x13c], ecx
push ecx
push edx
cmp ecx, eax
ja 0x1002ea3b
mov edi, dword [ebp - 0x18]
cmp dword [ebp - 0x24], 0x10
lea eax, [ecx + edi]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x38]
cmovae eax, dword [ebp - 0x38]
add edi, eax
push edi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x13c]
add esp, 0xc
mov byte [eax + edi], 0
mov edi, dword [ebp - 0x138]
jmp 0x1002ea4b
mov byte [ebp - 0x18], 0
push dword [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x38]
call fcn.10030b00
mov byte [ebp - 4], 9
lea edx, [ebp - 0x38]
cmp dword [ebp - 0x24], 0x10
lea ecx, [ebp - 0xd0]
push 0
push dword [ebp - 0x28]
cmovae edx, dword [ebp - 0x38]
call fcn.100e27b0
add esp, 8
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x130], 0x21
cmp edi, eax
je 0x1002eaab
mov ecx, edi
call fcn.10005300
mov eax, dword [ebp - 0x18]
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [edi], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [edi + 0x10], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edi, 0x21
mov dword [ebp - 0x130], edi
and edi, 0xffffffdf
mov dword [ebp - 0x130], edi
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xd0]
call fcn.10005300
push 0xb
xor eax, eax
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 0
lea ecx, [ebp - 0xe8]
push str._S__.._
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 7
mov word [ebp - 0xe8], ax
call fcn.10005390
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0xe8]
push ecx
xorps xmm0, xmm0
mov dword [ebp - 0x70], 0
push eax
lea ecx, [ebp - 0x80]
movups xmmword [ebp - 0x80], xmm0
call fcn.10030800
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0xb8]
push 0x38
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xb8], 0
mov byte [ebp - 0xb4], 0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xa8], 0
mov byte [ebp - 4], 0xc
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0xa0], 0
mov byte [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x94], 0
mov byte [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0
mov byte [ebp - 0x84], 0
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x138]
mov edx, ecx
cmp dword [ecx + 0x14], 8
jb 0x1002ebe2
mov edx, dword [ecx]
mov eax, dword [ecx + 0x10]
lea eax, [edx + eax*2]
mov edx, ecx
jb 0x1002ebee
mov edx, dword [ecx]
sub esp, 8
lea ecx, [ebp - 0xb8]
push eax
push edx
lea edx, [ebp - 0x80]
call fcn.100181c0
add esp, 0x10
test al, al
je 0x1002ed4a
mov ecx, dword [ebp - 0xac]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0xb0]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
ja 0x1002ec35
lea eax, [ebp - 0x8c]
jmp 0x1002ec3e
mov eax, dword [ebp - 0xb0]
add eax, 0xc
mov byte [ebp - 4], 0xf
cmp byte [eax + 8], 0
je 0x1002ec4f
mov ecx, dword [eax]
mov eax, dword [eax + 4]
jmp 0x1002ec53
xor ecx, ecx
xor eax, eax
xor edx, edx
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xbc], 7
mov word [ebp - 0xd0], dx
cmp ecx, eax
je 0x1002ec99
sub eax, ecx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0xd0]
call fcn.10005390
or edi, 0x80
mov dword [ebp - 0x130], edi
and edi, 0xffffff7f
mov dword [ebp - 0x130], edi
mov dword [ebp - 4], 0xe
or edi, 0x40
mov eax, dword [ebp - 0x144]
mov dword [ebp - 0x130], edi
push dword [eax + 8]
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.1002f3d0
mov ecx, eax
mov dword [ebp - 0x18], ecx
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x138]
cmp eax, ecx
je 0x1002ed23
mov ecx, eax
call fcn.10005300
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x138]
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [eax + 0x10], xmm0
xor eax, eax
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], ax
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x160]
call fcn.10005300
and edi, 0xffffffbf
mov dword [ebp - 0x130], edi
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0xd0]
call fcn.10005300
mov byte [ebp - 4], 0xb
mov edi, dword [ebp - 0xb0]
test edi, edi
je 0x1002edbe
mov ecx, dword [ebp - 0xa8]
mov eax, 0x2aaaaaab
sub ecx, edi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, edi
shl ecx, 2
cmp ecx, 0x1000
jb 0x1002ed96
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002ed96
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edi
call fcn.101c8702
add esp, 8
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xa8], 0
mov byte [ebp - 4], 0x12
or edi, 0xffffffff
mov ecx, dword [ebp - 0x80]
test ecx, ecx
je 0x1002eddf
mov eax, edi
lock xadd dword [ecx + 0x20], eax
jne 0x1002eddf
mov ecx, dword [ebp - 0x80]
xor edx, edx
call fcn.10013e20
mov dword [ebp - 0x80], 0
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x70]
test ecx, ecx
je 0x1002ee0e
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x1002ee0e
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xe8]
call fcn.10005300
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x24]
cmp edx, 0x10
jb 0x1002ee57
mov ecx, dword [ebp - 0x38]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002ee4d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002ee4d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.101c8702
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x58]
cmp edx, 0x10
jb 0x1002eea3
mov ecx, dword [ebp - 0x6c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002ee99
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002ee99
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.101c8702
add esp, 8
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0xf
mov byte [ebp - 0x6c], 0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x3c]
cmp edx, 0x10
jb 0x1002eeef
mov ecx, dword [ebp - 0x50]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002eee5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002eee5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.101c8702
add esp, 8
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0xf
mov byte [ebp - 0x50], 0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x1002ef29
mov eax, edi
lock xadd dword [ecx + 4], eax
jne 0x1002ef29
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x1c]
lock xadd dword [ecx + 8], edi
dec edi
jne 0x1002ef29
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x1002ef45
test eax, eax
je 0x1002ef45
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
push 4
push esi
call fcn.101c8702
add esp, 8
mov dword [ebp - 0x12c], 0
jmp 0x1002e8cf