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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x28
push 0
push 0
dec ecx
jne 0x13932d
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x139ff6
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
push 0
call sub.kernel32.dll_SetLastError
mov byte [0x2a8bd8], 1
mov dword [ebp - 0x20], 0xffffffff
mov eax, 0x2a8bdc
mov edx, esi
call fcn.00013c90
xor edx, edx
push ebp
push 0x139e38
push dword fs:[edx]
mov dword fs:[edx], esp
mov byte [0x2a8bd8], 2
cmp byte [ebp + 8], 0
je 0x139395
call fcn.00030064
xor edx, edx
push ebp
push 0x139e27
push dword fs:[edx]
mov dword fs:[edx], esp
mov byte [0x2a8bd8], 3
lea eax, [ebp - 0x4c]
call fcn.0002b4d8
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.0001d8bc
push dword [ebp - 0x48]
lea edx, [ebp - 0x54]
mov eax, 0x13a00c
call fcn.00031d88
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
call fcn.000144c4
push dword [ebp - 0x50]
lea eax, [ebp - 0x60]
call fcn.0002dadc
push dword [ebp - 0x60]
mov eax, 0x1f4
call fcn.00012bb4
cdq
push edx
push eax
lea eax, [ebp - 0x64]
call fcn.0002b0cc
push dword [ebp - 0x64]
call fcn.00031338
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x68]
call fcn.0002b0cc
push dword [ebp - 0x68]
lea edx, [ebp - 0x6c]
mov eax, 0x13a010
call fcn.00031d88
push dword [ebp - 0x6c]
lea eax, [ebp - 0x5c]
mov edx, 4
call fcn.00013f8c
mov edx, dword [ebp - 0x5c]
lea eax, [ebp - 0x58]
call fcn.000144c4
push dword [ebp - 0x58]
lea eax, [ebp - 0x24]
mov edx, 3
call fcn.00014618
mov byte [0x2a8bd8], 4
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x20], 0xffffffff
xor edx, edx
push ebp
push 0x139d93
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, ebx
call fcn.00014538
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x20], eax
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x1394a9
push 0
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x10], eax
mov byte [0x2a8bd8], 5
cmp dword [ebp - 0x20], 0xffffffff
je 0x1394c0
cmp dword [ebp - 0x10], 0
jne 0x139a70
mov byte [0x2a8bd8], 6
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x1394db
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_CloseHandle_1
mov dword [ebp - 0x20], 0xffffffff
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x78]
call fcn.0002b0cc
push dword [ebp - 0x78]
lea edx, [ebp - 0x7c]
mov eax, 0x13a014
call fcn.00031d88
push dword [ebp - 0x7c]
cmp dword [ebp - 0x20], 0xffffffff
setne al
lea edx, [ebp - 0x80]
call fcn.0002d050
push dword [ebp - 0x80]
lea edx, [ebp - 0x84]
mov eax, 0x13a014
call fcn.00031d88
push dword [ebp - 0x84]
lea edx, [ebp - 0x88]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
push dword [ebp - 0x88]
lea eax, [ebp - 0x74]
mov edx, 5
call fcn.00013f8c
mov edx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
call fcn.000144c4
mov eax, dword [ebp - 0x70]
call fcn.001391dc
mov byte [0x2a8bd8], 7
push 0
mov eax, dword [ebp - 0x24]
call fcn.00014538
push eax
mov eax, ebx
call fcn.00014538
mov esi, eax
push esi
call sub.kernel32.dll_CopyFileW
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x19], al
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
mov byte [0x2a8bd8], 8
cmp byte [ebp - 0x19], 0
jne 0x139983
mov byte [0x2a8bd8], 9
lea edx, [ebp - 0x90]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
mov edx, dword [ebp - 0x90]
lea eax, [ebp - 0x8c]
call fcn.000144c4
mov eax, dword [ebp - 0x8c]
call fcn.001390a0
mov byte [0x2a8bd8], 0xa
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x20], eax
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x139614
push 0
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x10], eax
jmp 0x139619
xor eax, eax
mov dword [ebp - 0x10], eax
mov byte [0x2a8bd8], 0xb
cmp dword [ebp - 0x10], 0
jbe 0x1398f8
cmp dword [ebp - 0x10], 0x1400000
jae 0x1398f8
mov byte [0x2a8bd8], 0xc
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.0002aea4
xor eax, eax
push ebp
push 0x1398f1
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_ReadFile_1
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
mov byte [0x2a8bd8], 0xd
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x13984d
mov byte [0x2a8bd8], 0xe
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_CloseHandle_1
mov dword [ebp - 0x20], 0xffffffff
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 0x24]
call fcn.00014538
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x20], eax
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
mov byte [0x2a8bd8], 0xf
cmp dword [ebp - 0x20], 0xffffffff
je 0x1397bd
mov byte [0x2a8bd8], 0x10
xor eax, eax
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_WriteFile_1
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_CloseHandle_1
mov dword [ebp - 0x20], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x13972d
mov byte [ebp - 0x19], 1
jmp 0x1398d8
mov byte [0x2a8bd8], 0x11
lea edx, [ebp - 0x9c]
mov eax, 0x13a018
call fcn.00031d88
push dword [ebp - 0x9c]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xa0]
call fcn.0002b0cc
push dword [ebp - 0xa0]
lea edx, [ebp - 0xa4]
mov eax, 0x13a01c
call fcn.00031d88
push dword [ebp - 0xa4]
lea edx, [ebp - 0xa8]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
push dword [ebp - 0xa8]
lea eax, [ebp - 0x98]
mov edx, 4
call fcn.00013f8c
mov edx, dword [ebp - 0x98]
lea eax, [ebp - 0x94]
call fcn.000144c4
mov eax, dword [ebp - 0x94]
call fcn.001391dc
jmp 0x1398d8
mov byte [0x2a8bd8], 0x12
lea edx, [ebp - 0xb4]
mov eax, 0x13a018
call fcn.00031d88
push dword [ebp - 0xb4]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xb8]
call fcn.0002b0cc
push dword [ebp - 0xb8]
lea edx, [ebp - 0xbc]
mov eax, 0x13a01c
call fcn.00031d88
push dword [ebp - 0xbc]
lea edx, [ebp - 0xc0]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
push dword [ebp - 0xc0]
lea eax, [ebp - 0xb0]
mov edx, 4
call fcn.00013f8c
mov edx, dword [ebp - 0xb0]
lea eax, [ebp - 0xac]
call fcn.000144c4
mov eax, dword [ebp - 0xac]
call fcn.001391dc
jmp 0x1398d8
mov byte [0x2a8bd8], 0x13
lea edx, [ebp - 0xcc]
mov eax, 0x13a018
call fcn.00031d88
push dword [ebp - 0xcc]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xd0]
call fcn.0002b0cc
push dword [ebp - 0xd0]
lea edx, [ebp - 0xd4]
mov eax, 0x13a01c
call fcn.00031d88
push dword [ebp - 0xd4]
lea edx, [ebp - 0xd8]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
push dword [ebp - 0xd8]
lea eax, [ebp - 0xc8]
mov edx, 4
call fcn.00013f8c
mov edx, dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
call fcn.000144c4
mov eax, dword [ebp - 0xc4]
call fcn.001391dc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x139983
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.0002aecc
ret
mov byte [0x2a8bd8], 0x14
lea edx, [ebp - 0xe4]
mov eax, 0x13a018
call fcn.00031d88
push dword [ebp - 0xe4]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xe8]
call fcn.0002b0cc
push dword [ebp - 0xe8]
lea edx, [ebp - 0xec]
mov eax, 0x13a01c
call fcn.00031d88
push dword [ebp - 0xec]
lea edx, [ebp - 0xf0]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
push dword [ebp - 0xf0]
lea eax, [ebp - 0xe0]
mov edx, 4
call fcn.00013f8c
mov edx, dword [ebp - 0xe0]
lea eax, [ebp - 0xdc]
call fcn.000144c4
mov eax, dword [ebp - 0xdc]
call fcn.001391dc
mov byte [0x2a8bd8], 0x15
cmp dword [ebp - 0x20], 0xffffffff
je 0x139999
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_CloseHandle_1
mov dword [ebp - 0x20], 0xffffffff
mov byte [0x2a8bd8], 0x16
cmp byte [ebp - 0x19], 0
je 0x139a38
mov byte [0x2a8bd8], 0x17
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x24]
call fcn.00014538
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x20], eax
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x139a00
mov byte [0x2a8bd8], 0x18
push 0
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x10], eax
jmp 0x139a70
mov byte [0x2a8bd8], 0x19
xor eax, eax
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0xf8]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
mov edx, dword [ebp - 0xf8]
lea eax, [ebp - 0xf4]
call fcn.000144c4
mov eax, dword [ebp - 0xf4]
call fcn.001391dc
jmp 0x139a70
mov byte [0x2a8bd8], 0x1a
lea edx, [ebp - 0x100]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
mov edx, dword [ebp - 0x100]
lea eax, [ebp - 0xfc]
call fcn.000144c4
mov eax, dword [ebp - 0xfc]
call fcn.001391dc
mov byte [0x2a8bd8], 0x1b
mov byte [0x2a8bd8], 0x1c
cmp dword [ebp - 0x20], 0xffffffff
je 0x139d68
mov byte [0x2a8bd8], 0x1d
cmp dword [ebp - 0x10], 0
jbe 0x139cdd
cmp dword [ebp - 0x10], 0x1400000
jae 0x139cdd
mov byte [0x2a8bd8], 0x1e
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.0002aea4
xor edx, edx
push ebp
push 0x139cd6
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_ReadFile_1
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x139bfd
mov byte [0x2a8bd8], 0x1f
cmp dword [ebp + 0xc], 0
je 0x139b24
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
dec eax
add ebx, eax
mov esi, ebx
mov eax, esi
mov ecx, 0xfd
mov edx, pe_nt_image_headers32
call fcn.00012b94
mov edx, esi
mov eax, 0x2a8bc0
mov ecx, 0x10
call fcn.00012840
mov byte [0x2a8bd8], 0x20
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.00138ed0
cmp eax, 0xffffffff
je 0x139be7
mov byte [0x2a8bd8], 0x21
mov ebx, dword [ebp - 0x14]
add ebx, eax
add ebx, 0x18
lea edx, [ebp - 0x34]
mov esi, ebx
mov eax, esi
mov ecx, 0x10
call fcn.00012840
mov eax, esi
xor ecx, ecx
mov edx, 0x30
call fcn.00012b94
lea ecx, [ebp - 0x44]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.0001aae8
mov byte [0x2a8bd8], 0x22
lea edx, [ebp - 0x34]
mov eax, dword [ebp + 0x14]
mov ecx, 0x10
call fcn.0002b004
test al, al
jne 0x139bad
mov eax, 0x13a024
call fcn.001391dc
jmp 0x139bdb
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x44]
mov ecx, 0x10
call fcn.0002b004
test al, al
je 0x139bd1
mov byte [ebp - 5], 1
mov eax, 0x13a038
call fcn.00138f64
jmp 0x139bdb
mov eax, 0x13a04c
call fcn.001391dc
mov byte [0x2a8bd8], 0x23
jmp 0x139cb6
mov byte [0x2a8bd8], 0x24
mov eax, 0x13a060
call fcn.001391dc
jmp 0x139cb6
mov byte [0x2a8bd8], 0x25
lea edx, [ebp - 0x10c]
mov eax, 0x13a018
call fcn.00031d88
push dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x110]
call fcn.0002b0cc
push dword [ebp - 0x110]
lea edx, [ebp - 0x114]
mov eax, 0x13a06c
call fcn.00031d88
push dword [ebp - 0x114]
mov eax, dword [ebp - 0x18]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x118]
call fcn.0002b0cc
push dword [ebp - 0x118]
lea edx, [ebp - 0x11c]
mov eax, 0x13a01c
call fcn.00031d88
push dword [ebp - 0x11c]
lea edx, [ebp - 0x120]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
push dword [ebp - 0x120]
lea eax, [ebp - 0x108]
mov edx, 6
call fcn.00013f8c
mov edx, dword [ebp - 0x108]
lea eax, [ebp - 0x104]
call fcn.000144c4
mov eax, dword [ebp - 0x104]
call fcn.001391dc
mov byte [0x2a8bd8], 0x26
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x139d68
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.0002aecc
ret
mov byte [0x2a8bd8], 0x27
lea edx, [ebp - 0x12c]
mov eax, 0x13a018
call fcn.00031d88
push dword [ebp - 0x12c]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x130]
call fcn.0002b0cc
push dword [ebp - 0x130]
lea edx, [ebp - 0x134]
mov eax, 0x13a01c
call fcn.00031d88
push dword [ebp - 0x134]
lea edx, [ebp - 0x138]
mov eax, dword [ebp - 0xc]
call fcn.0002b100
push dword [ebp - 0x138]
lea eax, [ebp - 0x128]
mov edx, 4
call fcn.00013f8c
mov edx, dword [ebp - 0x128]
lea eax, [ebp - 0x124]
call fcn.000144c4
mov eax, dword [ebp - 0x124]
call fcn.001391dc
mov byte [0x2a8bd8], 0x28
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x139d9a
cmp dword [ebp - 0x20], 0xffffffff
je 0x139d8b
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_CloseHandle_1
mov dword [ebp - 0x20], 0xffffffff
ret