Function at 0x104822d
Capabilities:
Get file size

Disassembly:
push 0x48
mov eax, 0x105f074
call fcn.0104dc9c
mov dword [ebp - 0x34], ecx
xor edi, edi
push 0xffffffffffffffff
add ecx, 4
push edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 4], edi
call fcn.01048112
mov esi, dword [ebp + 8]
cmp esi, edi
je 0x10486d0
cmp esi, 0xffffffff
je 0x10486d0
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp - 0x2c]
xor ebx, ebx
xor ecx, ecx
or edx, ebx
or ecx, eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], edx
mov ebx, 0x4a000
cmp dword [ebp - 0x2c], edi
jne 0x10482a6
cmp eax, ebx
ja 0x10482a6
push 0x10146e0
push 0x4000000
call fcn.01048b79
pop ecx
pop ecx
jmp 0x104830f
push edi
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x104831a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, edi
jle 0x10482cb
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
mov dword [ebp - 0x14], eax
jl 0x10482d9
mov dword [ebp - 0x14], 0x80004005
push ebx
push 0x1014698
push 0x101466c
call esi
push eax
call fcn.01048d15
add esp, 0x10
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0
jge 0x104830f
mov ecx, dword [ebp - 0x34]
push 0xffffffffffffffff
push 0
add ecx, 4
call fcn.01048112
mov dword [ebp - 0x14], 0x8007000d
mov eax, dword [ebp - 0x14]
call fcn.0104dd50
ret 4
push edi
lea eax, [ebp - 0x24]
push eax
push 2
lea eax, [ebp - 0x30]
push eax
push esi
call fcn.01047547
cmp eax, edi
jne 0x104836a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, edi
jle 0x1048345
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
mov dword [ebp - 0x14], eax
jl 0x1048353
mov dword [ebp - 0x14], 0x80004005
push 0x1014628
push 0x1014600
call esi
push eax
call fcn.01048d15
add esp, 0xc
jmp 0x10482ef
movzx eax, word [ebp - 0x30]
push eax
push 0x10145b0
push 0x4000000
call fcn.01048b79
add esp, 0xc
mov dword [ebp - 0x1c], edi
movzx eax, word [ebp - 0x30]
cmp dword [ebp - 0x1c], eax
jae 0x10482ef
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x20], edi
push 0x20
mov byte [ebp - 4], 2
mov dword [ebp - 0x28], edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
pop ecx
cmp ebx, edi
je 0x10483b5
mov ecx, ebx
call fcn.010302f0
jmp 0x10483b7
xor ebx, ebx
mov dword [ebp - 0x18], ebx
cmp ebx, edi
jne 0x10483f1
push 0x1014598
push 0x1014570
push 0x8007000e
call fcn.01048c52
add esp, 0xc
push edi
mov byte [ebp - 4], 1
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
lea ecx, [ebp - 0x18]
call fcn.0104761d
or dword [ebp - 4], 0xffffffff
jmp 0x10482f9
push edi
lea eax, [ebp - 0x24]
push eax
push 8
lea esi, [ebx + 8]
push esi
push dword [ebp + 8]
call fcn.01047547
cmp eax, edi
jne 0x104845c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, edi
jle 0x104841e
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
mov dword [ebp - 0x14], eax
jl 0x104842c
mov dword [ebp - 0x14], 0x80004005
push dword [ebp - 0x1c]
push 0x1014508
push 0x10144dc
call esi
push eax
call fcn.01048d15
add esp, 0x10
push edi
mov byte [ebp - 4], 1
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
lea ecx, [ebp - 0x18]
call fcn.0104761d
jmp 0x10482ef
push 0
lea eax, [ebp - 0x24]
push eax
push 8
lea edi, [ebx + 0x10]
push edi
push dword [ebp + 8]
call fcn.01047547
test eax, eax
jne 0x10484b4
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x104848a
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1048498
mov dword [ebp - 0x14], 0x80004005
push dword [ebp - 0x1c]
push 0x1014478
push 0x1014450
call esi
push eax
call fcn.01048d15
add esp, 0x10
push 0
jmp 0x1048445
mov eax, dword [edi]
mov ecx, dword [esi]
mov edx, dword [edi + 4]
add ecx, eax
mov dword [ebp - 0x44], eax
mov eax, dword [esi + 4]
adc eax, edx
mov dword [ebp - 0x40], edx
cmp eax, dword [esi + 4]
ja 0x10484fc
jb 0x10484d3
cmp ecx, dword [esi]
jae 0x10484fc
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push dword [esi + 4]
push dword [esi]
push 0x10143f0
push 0x10143c8
push 0x8007000d
call fcn.01048c52
add esp, 0x1c
push 0
jmp 0x10483d6
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov dword [ebp - 0x54], ecx
add ecx, dword [ebp - 0x44]
mov dword [ebp - 0x50], eax
adc eax, dword [ebp - 0x40]
cmp dword [ebp - 0x48], eax
ja 0x1048531
jb 0x1048519
cmp dword [ebp - 0x4c], ecx
jae 0x1048531
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push dword [ebp - 0x50]
push dword [ebp - 0x54]
push 0x1014368
push 0x1014340
jmp 0x10484e8
push 0
lea ecx, [ebp - 0x24]
push ecx
lea eax, [ebx + 0x18]
push 4
push eax
push dword [ebp + 8]
mov dword [ebp - 0x38], eax
call fcn.01047547
test eax, eax
jne 0x1048582
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x1048562
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1048570
mov dword [ebp - 0x14], 0x80004005
push dword [ebp - 0x1c]
push 0x10142d8
push 0x10142ac
jmp 0x10484a5
push 0
lea eax, [ebp - 0x24]
push eax
push 2
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 8]
call fcn.01047547
test eax, eax
jne 0x10485d0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x10485b0
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x10485be
mov dword [ebp - 0x14], 0x80004005
push dword [ebp - 0x1c]
push 0x1014238
push 0x101420c
jmp 0x10484a5
movzx eax, word [ebp - 0x28]
inc eax
push eax
lea ecx, [ebp - 0x20]
call fcn.01033530
movzx eax, al
test eax, eax
jne 0x1048604
push 0x10141ec
push 0x10141c4
push 0x8007000e
call fcn.01048c52
add esp, 0xc
push dword [ebp - 0x20]
jmp 0x10483d6
push 0
lea eax, [ebp - 0x24]
push eax
movzx eax, word [ebp - 0x28]
add eax, eax
push eax
push dword [ebp - 0x20]
push dword [ebp + 8]
call fcn.01047547
test eax, eax
jne 0x1048664
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x1048636
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1048644
mov dword [ebp - 0x14], 0x80004005
push dword [ebp - 0x1c]
push 0x1014160
push 0x1014138
call esi
push eax
call fcn.01048d15
add esp, 0x10
push dword [ebp - 0x20]
jmp 0x1048445
movzx ecx, word [ebp - 0x28]
mov eax, dword [ebp - 0x20]
xor edx, edx
mov word [eax + ecx*2], dx
push eax
mov ecx, ebx
call fcn.01031359
mov eax, dword [ebp - 0x38]
push dword [eax]
mov ebx, dword [ebx]
movzx eax, word [ebp - 0x28]
push ebx
push eax
push dword [edi + 4]
push dword [edi]
push dword [esi + 4]
push dword [esi]
push 0x10140c0
push 0x4000000
call fcn.01048b79
mov ecx, dword [ebp - 0x34]
add esp, 0x24
lea eax, [ebp - 0x18]
push eax
add ecx, 4
call fcn.01043d57
push dword [ebp - 0x20]
mov byte [ebp - 4], 1
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
lea ecx, [ebp - 0x18]
call fcn.0104761d
inc dword [ebp - 0x1c]
xor edi, edi
jmp 0x1048384
push 0x1014084
push 0x101405c
push 0x80070057
call fcn.01048c52
add esp, 0xc
jmp 0x10483e8