Function at 0x4d8780
Capabilities:
Get file size

Disassembly:
sub esp, 0x114
mov dword [esp], 0xffffffff
push ebx
push esi
mov ebx, dword [esp + 0x12c]
push edi
push ebp
xor edi, edi
mov esi, dword [esp + 0x128]
mov eax, 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
cmp dword [esi + 0x100], edi
je 0x4d87c2
push 3
push esi
call fcn.004b4460
add esp, 8
test eax, eax
je 0x4d87d5
mov ax, 0xfffe
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x114
ret
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x12c]
push eax
push ecx
push esi
call fcn.004b92b0
lea ecx, [esp + 0x2c]
add esp, 0xc
push ecx
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.USER32.dll_OemToCharA]
cmp word [esi + 0xa2], 0
jne 0x4d8939
mov ebp, dword [esi + 0x94]
test ebp, ebp
je 0x4d8878
test esi, esi
je 0x4d8826
mov eax, dword [esi + 0xac]
test eax, eax
je 0x4d8826
mov ecx, dword [eax + 0x2c]
jmp 0x4d8828
xor ecx, ecx
lea eax, [esp + 0x20]
lea edx, [ebp + 0xc]
push eax
push edx
push ecx
call fcn.004ae9e0
add esp, 0xc
test ax, ax
jne 0x4d89df
mov ebp, dword [ebp]
test ebp, ebp
jne 0x4d8813
jmp 0x4d8878
xor ecx, ecx
lea eax, [esp + 0x20]
lea edx, [ebp + 0xc]
push eax
push edx
push ecx
call fcn.004ae9e0
add esp, 0xc
test ax, ax
jne 0x4d891a
mov ebp, dword [ebp]
test ebp, ebp
jne 0x4d8947
mov ebx, dword [esp + 0x1c]
push 1
push esi
call fcn.004bbee0
add esp, 8
test eax, eax
jne 0x4d89df
mov dword [esp + 0x18], 1
lea eax, [esp + 0x20]
push 0
push 0x20
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 3
push 0
push 3
push 0xc0000000
push eax
call ebp
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x4d89df
push 0
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
call ebp
mov dword [esp + 0x14], eax
mov bp, 1
push 0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_LockFile]
cmp eax, 1
je 0x4d8965
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x4d88fe
cmp eax, 0x21
jne 0x4d89df
mov eax, ebx
dec ebx
test eax, eax
je 0x4d8968
push 0x3d090
push esi
call fcn.004d8d70
mov bp, ax
test bp, bp
je 0x4d88cb
jmp 0x4d8968
mov eax, ebx
dec ebx
test eax, eax
je 0x4d89df
push 0x3d090
push esi
call fcn.004d8d70
test ax, ax
jne 0x4d89df
mov ebp, dword [esi + 0x94]
test ebp, ebp
je 0x4d8874
test esi, esi
je 0x4d884c
mov eax, dword [esi + 0xac]
test eax, eax
je 0x4d884c
mov ecx, dword [eax + 0x2c]
jmp 0x4d884e
xor bp, bp
test bp, bp
jne 0x4d8a00
push 0x8000
mov eax, dword [esi + 0x44]
push 0x10c
push eax
push esi
call fcn.004aa140
add esp, 0x10
mov edi, eax
test edi, edi
je 0x4d89df
test esi, esi
je 0x4d89a1
mov eax, dword [esi + 0xac]
test eax, eax
je 0x4d89a1
mov ecx, dword [eax + 0x2c]
jmp 0x4d89a3
xor ecx, ecx
lea eax, [esp + 0x20]
lea edx, [edi + 0xc]
push eax
push edx
push ecx
call fcn.004ade40
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
xor ax, ax
add esp, 0xc
mov dword [edi + 4], ecx
pop ebp
mov dword [edi + 8], edx
mov ebx, dword [esi + 0x94]
mov dword [edi], ebx
mov dword [esi + 0x94], edi
pop edi
pop esi
pop ebx
add esp, 0x114
ret
cmp byte [esp + 0x138], 0
jne 0x4d8a00
lea eax, [esp + 0x20]
push eax
push 1
push 0xffff8200
push 2
push esi
call fcn.004bda00
add esp, 0x14
cmp dword [esp + 0x18], 0
je 0x4d8a12
push 0xffffffffffffffff
push esi
call fcn.004bbee0
add esp, 8
cmp dword [esp + 0x10], 0xffffffff
je 0x4d8a24
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x4d8a36
push edi
mov eax, dword [esi + 0x44]
push eax
push esi
call fcn.004aa460
add esp, 0xc
mov ax, 0xfffe
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x114
ret