Function at 0x4089e0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [esp], eax
call fcn.00409690
test eax, eax
mov ebx, eax
je 0x408ba5
mov dword [esp], eax
mov edi, 2
call sub.msvcrt.dll_wcslen
lea eax, [eax + eax + 0x10]
mov dword [esp], eax
call fcn.004099b0
test eax, eax
mov dword [esi], eax
je 0x408b93
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
lea edx, [eax + eax + 0x10]
mov eax, dword [esi]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00409fe0
test al, al
jne 0x408bf0
mov edi, dword [str..pipe_]
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
mov eax, dword [esi]
je 0x408bc0
mov dword [eax + 8], 0
movzx edx, word [ebx]
mov eax, dword [esi]
add eax, 0xc
test dx, dx
je 0x408ab2
mov ecx, ebx
lea esi, [esi]
add eax, 2
add ecx, 2
mov word [eax - 2], dx
movzx edx, word [ecx]
test dx, dx
jne 0x408aa0
xor edx, edx
test byte [ebp + 0xc], 2
mov word [eax], dx
jne 0x408ad3
test byte [ebp + 0xc], 1
jne 0x408c20
mov eax, dword [esi]
mov edi, 8
jmp 0x408bac
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0x11
mov dword [esp + 4], str..physicaldrive
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__strnicmp]
test eax, eax
mov edx, 3
je 0x408b04
mov edx, dword [ebp + 0xc]
shl edx, 0x1d
sar edx, 0x1f
add edx, 3
mov eax, dword [ebp + 0xc]
and eax, 1
cmp eax, 1
sbb edi, edi
and edi, 0x80000000
sub edi, 0x40000000
mov ecx, dword [esi]
mov dword [ebp - 0x30], edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0x2c], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34], eax
call eax
mov ecx, dword [ebp - 0x2c]
sub esp, 0x1c
mov edx, dword [ebp - 0x30]
mov dword [ecx], eax
mov eax, dword [esi]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x408c2f
lea edx, [ebp - 0x1c]
mov dword [esp], eax
xor edi, edi
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp - 0x1c]
sub esp, 8
mov dword [ecx], eax
mov dword [ecx + 4], esi
mov dword [esp], ebx
call fcn.004099e0
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi]
mov edi, 2
test eax, eax
je 0x408b93
mov dword [esp], eax
call fcn.004099e0
mov dword [esi], 0
jmp 0x408b93
mov dword [eax + 8], 2
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00409db0
mov edi, eax
test edi, edi
je 0x408b93
mov eax, dword [esi]
jmp 0x408bac
mov eax, dword [esi]
mov dword [eax + 8], 1
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040a040
mov edi, eax
jmp 0x408be6
mov edi, 0x80000000
mov edx, 3
jmp 0x408b1b
mov dword [ebp - 0x2c], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
mov ecx, eax
mov edx, dword [ebp - 0x2c]
je 0x408c5b
mov eax, dword [esi]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x408b73
mov dword [esp], ecx
call fcn.00409ca0
mov edi, eax
jmp 0x408be6
mov eax, dword [ebp + 0xc]
and eax, 0xc
cmp eax, 0xc
jne 0x408c42
mov dword [esp + 4], 0x5c
mov eax, dword [esi]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x30], edx
add eax, 0xc
mov dword [esp], eax
call sub.msvcrt.dll_wcsrchr
test eax, eax
mov ecx, dword [ebp - 0x2c]
je 0x408c42
mov word [eax], 0
mov ecx, dword [esi]
mov dword [ebp - 0x2c], eax
lea eax, [ecx + 0xc]
call fcn.004088e0
mov ecx, eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
test ecx, ecx
mov word [eax], 0x5c
jne 0x408c42
mov eax, dword [esi]
mov dword [esp + 4], edi
mov dword [ebp - 0x2c], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], edx
mov edi, eax
add eax, 0xc
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp], eax
call dword [ebp - 0x34]
mov ecx, dword [ebp - 0x2c]
sub esp, 0x1c
mov dword [edi], eax
jmp 0x408c42