Function at 0x407466
Capabilities:
Get file size

Disassembly:
push ebp
lea ebp, [esp - 0x474]
sub esp, 0x4f4
mov eax, dword [0x437b00]
xor eax, ebp
mov dword [ebp + 0x470], eax
mov ecx, dword [ebp + 0x480]
mov eax, dword [ebp + 0x47c]
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x64], ecx
mov ecx, dword [ebp + 0x484]
lea esi, [ebp - 0x40]
push edi
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x5c], ebx
sub esi, eax
movzx ecx, word [eax]
mov word [esi + eax], cx
inc eax
inc eax
cmp cx, bx
jne 0x4074af
mov edi, dword [sym.imp.PPLIB32W.DLL__VFSGetDriveType_12]
push ebx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x40]
push eax
call edi
mov dword [ebp - 0x50], eax
cmp eax, ebx
jne 0x4074f7
push ebx
lea eax, [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.PPLIB32W.DLL__VFSFullPath_12]
push ebx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x40]
push eax
call edi
mov dword [ebp - 0x50], eax
cmp eax, ebx
je 0x40783c
mov eax, dword [ebp - 0x4c]
dec eax
dec eax
je 0x40783c
sub eax, 4
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
je 0x407543
cmp dword [ebp - 0x4c], 0x16
je 0x407519
cmp dword [ebp - 0x4c], 0xffffffff
jg 0x407563
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
push eax
push dword [0x43b52c]
call dword [sym.imp.PPLIB32W.DLL__VFSGetRealPath_12]
test eax, eax
jne 0x407563
mov eax, dword [ebp - 0x48]
movzx ecx, word [eax]
mov word [esi + eax], cx
inc eax
inc eax
cmp cx, bx
jne 0x407533
jmp 0x407563
sub dword [ebp - 0x50], 4
mov eax, dword [ebp - 0x50]
movzx eax, word [eax]
push eax
lea eax, [ebp - 0x40]
push str.._c:
push eax
call edi
add esp, 0xc
mov dword [ebp - 0x68], 1
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.PPLIB32W.DLL__VFSFindLastEntry_4]
mov esi, eax
cmp dword [ebp - 0x68], ebx
jne 0x40764a
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.PPLIB32W.DLL__GetFileAttributesL_4]
cmp eax, 0xffffffff
jne 0x40764c
cmp dword [ebp - 0x44], ebx
jne 0x4075cd
lea eax, [ebp - 0x40]
push 0x3a
push eax
call fcn.004229bc
pop ecx
pop ecx
mov dword [ebp - 0x44], eax
cmp eax, ebx
je 0x4075cd
lea ecx, [ebp - 0x3c]
cmp eax, ecx
jb 0x4075cd
cmp word [eax - 2], 0x3a
jne 0x4075cd
xor ecx, ecx
mov word [eax - 2], cx
lea ecx, [ebp - 0x40]
sub eax, ecx
mov ecx, dword [ebp - 0x48]
sar eax, 1
lea eax, [ecx + eax*2 - 2]
mov ecx, dword [ebp - 0x60]
mov dword [ecx], eax
jmp 0x407563
or dword [ebp - 0x44], 0xffffffff
cmp dword [ebp - 0x4c], 0x16
je 0x4075dd
cmp dword [ebp - 0x4c], 0xffffffff
jg 0x407638
push ebx
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x58]
push eax
push ebx
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x58], ebx
call dword [sym.imp.PPLIB32W.DLL__VFSLoadFileImage_20]
test eax, eax
jne 0x407638
mov eax, dword [ebp - 0x54]
add eax, 0x400
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x43bd6c], eax
cmp eax, ebx
je 0x407638
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [0x43bd68], eax
cmp eax, ebx
jne 0x4077d4
push dword [0x43bd6c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call fcn.0040fe23
cmp word [esi], bx
je 0x40767a
xor eax, eax
inc dword [ebp - 0x5c]
mov word [esi], ax
jmp 0x407563
xor eax, eax
test al, 0x10
je 0x407680
cmp dword [ebp - 0x5c], ebx
jne 0x407672
cmp word [esi], 0x5c
jne 0x40765d
inc esi
inc esi
push esi
push str._s_is_directory.
push 0x43bd80
call edi
add esp, 0xc
jmp 0x407846
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
jmp 0x407841
push ebx
push 0x8000000
push 3
push ebx
push 3
push 0x80000000
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.PPLIB32W.DLL__CreateFileL_28]
mov edi, eax
cmp edi, 0xffffffff
je 0x40767a
cmp dword [ebp - 0x44], ebx
je 0x4076c0
cmp dword [ebp - 0x44], 0xffffffff
je 0x4076c0
push dword [ebp - 0x44]
call dword [sym.imp.PPLIB32W.DLL__FindPathSeparator_4]
cmp eax, ebx
je 0x4076c0
xor ecx, ecx
mov word [eax], cx
jmp 0x4076d8
lea eax, [ebp - 0x40]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x4076c6
sub eax, edx
sar eax, 1
lea eax, [ebp + eax*2 - 0x40]
lea ecx, [ebp - 0x40]
cmp dword [ebp - 0x68], ebx
je 0x40777e
mov eax, dword [ebp - 0x50]
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
sub eax, ecx
mov ecx, dword [ebp - 0x48]
sar eax, 1
lea eax, [ecx + eax*2 + 4]
mov ecx, dword [ebp - 0x64]
push ebx
mov dword [ecx], eax
lea eax, [ebp - 0x60]
push eax
push 0x18
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push 0x2404c
push edi
call esi
test eax, eax
jne 0x407744
push ebx
lea eax, [ebp - 0x60]
push eax
push 0x18
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push 0x70000
push edi
call esi
test eax, eax
jne 0x407744
mov dword [0x438ff0], 0xc800000
mov dword [0x438ff4], ebx
jmp 0x4077c6
mov esi, dword [ebp - 0x6c]
imul esi, dword [ebp - 0x70]
imul esi, dword [ebp - 0x74]
push 0x438ff4
push 0x438ff0
push dword [ebp - 0x80]
push esi
call fcn.0041f91d
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x7c]
push esi
call fcn.0041f91d
mov eax, dword [ebp - 0x58]
add dword [0x438ff4], eax
jmp 0x4077c6
sub eax, ecx
mov ecx, dword [ebp - 0x48]
sar eax, 1
lea eax, [ecx + eax*2]
mov ecx, dword [ebp - 0x64]
push 0x438ff4
push edi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x438ff0], eax
cmp eax, 0xffffffff
jne 0x4077bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
je 0x4077bc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
jmp 0x407841
mov dword [0x43bd78], 1
mov eax, dword [0x438ff0]
mov dword [0x43bd70], eax
mov eax, edi
jmp 0x407848
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push eax
call fcn.004223c0
mov eax, dword [ebp - 0x54]
mov ecx, dword [0x43bd68]
push 0x400
add ecx, eax
push ebx
push ecx
call fcn.004229f0
mov eax, dword [ebp - 0x48]
mov edx, 0x43c230
add esp, 0x18
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
inc eax
inc eax
cmp cx, bx
jne 0x407804
xor eax, eax
inc eax
mov dword [0x43ca30], eax
mov dword [0x438fe8], eax
mov eax, dword [ebp - 0x54]
mov dword [0x43bd74], eax
mov dword [0x43bd70], eax
mov dword [0x438ff0], eax
mov dword [0x438ff4], ebx
or eax, 0xffffffff
jmp 0x407848
push 0xa1
call fcn.0040fe23
xor eax, eax
mov ecx, dword [ebp + 0x470]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422725
add ebp, 0x474
leave
ret 0xc