Function at 0x470110
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
mov eax, dword [0x565680]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x100], edi
and edi, 0xff
mov dword [ebp - 0xfc], ebx
mov dword [ebp - 0xe8], eax
cmp ecx, 1
jne 0x470167
mov ecx, SysReAllocStringLen
mov eax, 3
mov dword [ebp - 0xf8], 0x4e23
jmp 0x470295
xor eax, eax
cmp ecx, 2
setne al
lea eax, [eax*2 + 2]
mov dword [ebp - 0xf0], eax
call fcn.00471ab0
test al, al
jne 0x4701d0
mov edx, dword [0x566ac0]
mov eax, edx
xor ecx, ecx
and eax, 0x8000003f
jns 0x47019b
dec eax
or eax, 0xffffffc0
inc eax
cmp eax, 0x90
je 0x4701c8
mov eax, edx
or eax, 0xffffffc9
add edx, eax
mov eax, edx
imul eax, edx
inc ecx
cmp ecx, eax
jg 0x4701c8
mov eax, edx
and eax, 0x8000003f
jns 0x4701c1
dec eax
or eax, 0xffffffc0
inc eax
cmp eax, 0x90
jne 0x4701a2
mov dword [0x566ac0], ecx
jmp 0x4701d6
mov ecx, dword [0x566ac0]
mov eax, 1
test edi, edi
cmove edi, eax
mov eax, ecx
imul eax, ecx
cdq
mov esi, 0x18
idiv esi
mov dword [ebp + 0x10], edi
mov dword [ebp - 0xf8], 0x4e24
cmp edx, 7
jne 0x47028a
xor ebx, ebx
lea eax, [ebp - 0xe4]
jmp 0x470210
xor edx, edx
mov dword [ebp - 0xf4], edx
mov dword [ebp - 0xec], eax
mov edi, edi
lea edi, [edx + 1]
mov eax, ecx
cdq
lea esi, [ebx + 1]
idiv esi
mov eax, ecx
sub eax, ebx
mov esi, edx
imul esi, eax
mov eax, ecx
cdq
idiv edi
add esi, eax
sub esi, dword [ebp - 0xf4]
push esi
push 0x519f70
call fcn.004e6944
mov eax, dword [ebp - 0xec]
mov edx, edi
add eax, 4
add esp, 8
mov dword [ebp - 0xf4], edi
mov dword [ebp - 0xec], eax
cmp edx, 0x1c
jge 0x470273
mov ecx, dword [0x566ac0]
jmp 0x470220
inc ebx
cmp ebx, 2
jge 0x470281
mov ecx, dword [0x566ac0]
jmp 0x470210
mov ebx, dword [ebp - 0xfc]
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp - 0xf0]
mov ecx, 0x40000000
push 0
push 0x80
push eax
push 0
push 1
push ecx
push dword [ebp - 0xe8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4702fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.004656e0
mov edi, eax
mov eax, dword [ebp - 0xf8]
push edi
push esi
push dword [ebp - 0xe8]
movzx ecx, ax
push ecx
call fcn.004656c0
push edi
call fcn.004e5db5
add esp, 0x18
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e52a4
mov esp, ebp
pop ebp
ret 0x10
push dword [ebp - 0xe8]
call fcn.00465870
mov ecx, dword [ebp + 0xc]
mov dword [ebx], eax
mov eax, dword [ebp - 0x100]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x14]
add esp, 4
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edi
mov byte [ebx + 0x10], 0
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], esi
cmp ecx, 1
jne 0x47034b
mov ecx, ebx
call fcn.0046f900
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e52a4
mov esp, ebp
pop ebp
ret 0x10
mov byte [ebx + 0x24], 1
cmp ecx, 3
jne 0x470372
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x470372
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov byte [ebx + 0x24], 0
mov ecx, ebx
call fcn.0046fea0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004e52a4
mov esp, ebp
pop ebp
ret 0x10