Function at 0x42f030
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x48b450
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b1784]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
xor ebp, ebp
xor esi, esi
mov dword [esp + 0x18], ebp
lea eax, [esp + 0x20]
push 0x4bd950
push eax
mov ebx, 0x49b8d0
mov dword [esp + 0x4c], esi
call fcn.00409750
mov eax, dword [eax]
add esp, 8
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x42f0a1
call fcn.004164a0
mov edi, eax
jmp 0x42f0a9
mov dword [esp + 0x18], eax
xor edi, edi
mov ebp, eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f0c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, esi
jge 0x42f0d4
cmp ebp, esi
jmp 0x42f385
lea ecx, [esp + 0x30]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x2c], eax
jne 0x42f0f6
call fcn.004164a0
cmp eax, esi
jl 0x42f106
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, eax
or edx, ecx
mov ebx, eax
mov dword [esp + 0x30], ecx
jne 0x42f10d
cmp ebp, esi
jmp 0x42f385
cmp ecx, esi
ja 0x42f118
cmp eax, 0x10000
jb 0x42f121
mov ebx, 0x10000
mov dword [esp + 0x30], esi
push ebx
call fcn.00460f82
mov edi, eax
add esp, 4
mov dword [esp + 0x2c], edi
cmp edi, esi
mov byte [esp + 0x44], 1
jne 0x42f149
push esi
call fcn.00469050
add esp, 4
cmp ebp, esi
jmp 0x42f385
mov esi, ebx
mov ecx, edi
lea edx, [esp + 0x18]
call fcn.00434ae0
test ebp, ebp
je 0x42f16d
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 0
mov ebp, dword [esp + 0x18]
mov eax, dword [0x4bb38c]
mov edx, dword [eax + 0xc]
add ebx, edi
mov ecx, 0x4bb38c
mov esi, edi
mov dword [esp + 0x28], ebx
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x44], 2
mov eax, dword [0x4bb38c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4bb38c
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
cmp edi, ebx
mov byte [esp + 0x44], 3
jae 0x42f329
cmp word [esi], 0x13d6
jne 0x42f325
movzx eax, word [esi + 2]
add eax, esi
cmp eax, ebx
mov dword [esp + 0x24], eax
ja 0x42f325
movzx edx, word [esi + 0x28]
movzx ecx, word [esi + 0x2a]
movzx ebp, word [esi + 0x26]
add ecx, edx
movzx edx, word [esi + 0x24]
add edx, esi
add edx, ecx
add ebp, edx
cmp ebp, eax
ja 0x42f321
test byte [esi + 0x20], 1
je 0x42f2fd
mov ebp, dword [esp + 0x4c]
mov ebx, dword [ebp + 4]
lea edi, [ebx + 1]
mov eax, ebp
call fcn.00434110
test al, al
je 0x42f30d
cmp ebx, dword [ebp + 4]
jae 0x42f317
mov ecx, dword [ebp]
mov edx, dword [esi + 4]
movzx ebp, word [esi + 0x24]
lea eax, [ebx + ebx*2]
lea edi, [ecx + eax*8]
mov dword [edi + 8], edx
mov eax, dword [esi + 8]
mov dword [edi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov dword [edi + 0x10], ecx
mov edx, dword [esi + 0x10]
mov dword [edi + 0x14], edx
movzx ebx, word [esi + 0x26]
add ebp, esi
push ebp
lea eax, [esp + 0x20]
call fcn.00415d80
mov ecx, dword [edi]
test ecx, ecx
jne 0x42f25b
xor eax, eax
jmp 0x42f275
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x42f260
sub eax, ebx
sar eax, 1
js 0x42f317
cmp eax, dword [ecx - 8]
jg 0x42f317
mov dword [ecx - 0xc], eax
mov ecx, dword [edi]
mov word [ecx + eax*2], 0
movzx edx, word [esi + 0x26]
lea eax, [esp + 0x20]
push edi
push eax
lea eax, [esp + 0x24]
lea ebp, [ebp + edx*2]
call fcn.0042ef50
add esp, 8
test eax, eax
jne 0x42f2b0
lea eax, [esp + 0x1c]
call fcn.0040b8a0
movzx ebx, word [esi + 0x28]
add edi, 4
push ebp
mov eax, edi
call fcn.00415d80
mov edx, dword [edi]
test edx, edx
jne 0x42f2c9
xor eax, eax
jmp 0x42f2e1
mov eax, edx
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x42f2d0
sub eax, esi
sar eax, 1
js 0x42f317
cmp eax, dword [edx - 8]
jg 0x42f317
mov ebx, dword [esp + 0x28]
mov dword [edx - 0xc], eax
mov ecx, dword [edi]
mov edi, dword [esp + 0x2c]
mov word [ecx + eax*2], 0
mov eax, dword [esp + 0x24]
cmp eax, ebx
mov ebp, dword [esp + 0x18]
mov esi, eax
jb 0x42f1b3
jmp 0x42f329
push 0x8007000e
call fcn.00416be0
push 0x80070057
call fcn.00416be0
mov ebp, dword [esp + 0x18]
cmp esi, ebx
jb 0x42f368
lea ecx, [esp + 0x20]
call fcn.00416ba0
lea ecx, [esp + 0x1c]
call fcn.00416ba0
push edi
call fcn.00469050
add esp, 4
test ebp, ebp
je 0x42f34f
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
lea ecx, [esp + 0x20]
call fcn.00416ba0
lea ecx, [esp + 0x1c]
call fcn.00416ba0
push edi
call fcn.00469050
add esp, 4
test ebp, ebp
je 0x42f38e
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret