Function at 0x421600
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x496106
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x4d4028]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x14], ebx
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x4217c8
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push esi
push 0x8000080
push 3
push esi
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x18], ebx
cmp ebx, 0xffffffff
mov dword [ebp - 4], esi
lea ecx, [ebp + 0xc]
je 0x4217a9
push ecx
push ebx
mov dword [ebp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0xffffffff
mov esi, eax
jne 0x4216a7
push 0x4a4090
lea ecx, [ebp + 0x14]
call dword [0x4a2ed8]
lea edx, [ebp + 0x14]
push edx
mov ecx, 7
mov edx, esi
mov byte [ebp - 4], 1
call fcn.004230a0
cmp dword [ebp + 0xc], 0
je 0x4216d2
push 0x4a4090
lea ecx, [ebp + 0x14]
call dword [0x4a2ed8]
lea eax, [ebp + 0x14]
push eax
mov ecx, 4
mov edx, 0x208
mov byte [ebp - 4], 2
call fcn.004230a0
test edi, edi
jne 0x4216f9
push 0x4a4090
lea ecx, [ebp + 0x14]
call dword [0x4a2ed8]
lea ecx, [ebp + 0x14]
push ecx
lea ecx, [edi + 4]
mov edx, 0x209
mov byte [ebp - 4], 3
call fcn.004230a0
lea edx, [edi + 1]
push edx
call fcn.004903b4
add esp, 4
mov esi, eax
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push esi
mov byte [esi], 0
push ebx
mov dword [ebp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42172b
mov ecx, dword [ebp + 0x10]
mov byte [ecx + esi], 0
push esi
lea ecx, [ebp + 8]
call dword [0x4a2bf8]
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
mov edx, dword [edx + 0x38]
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp + 0x14]
push eax
call edx
lea ecx, [ebp + 8]
mov edi, eax
mov byte [ebp - 4], 0
call dword [0x4a2d9c]
push esi
call fcn.004903a8
add esp, 4
test edi, edi
jne 0x42178a
push 0x4a4090
lea ecx, [ebp + 0x14]
call dword [0x4a2ed8]
lea eax, [ebp + 0x14]
push eax
lea ecx, [edi + 4]
mov edx, 0x20a
mov byte [ebp - 4], 5
call fcn.004230a0
test ebx, ebx
je 0x421795
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x4a4090
call dword [0x4a2ed8]
lea ecx, [ebp + 0xc]
push ecx
mov ecx, 7
xor edx, edx
mov byte [ebp - 4], 6
call fcn.004230a0
lea ecx, [ebp - 0x44]
call fcn.00490300
lea edx, [ebp - 0x30]
push edx
mov dword [ebp - 4], 7
call fcn.004236e0
mov byte [ebp - 4], 8
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
lea ecx, [ebp - 0x30]
push ecx
push 0x4020
push eax
lea ecx, [ebp - 0x44]
call fcn.00490228
test eax, eax
je 0x4219c9
lea ecx, [ebp + 0x10]
call dword [0x4a2ef4]
push 0x1000
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 9
call dword [0x4a2bc0]
lea ecx, [ebp - 0x14]
call dword [0x4a2ef4]
mov byte [ebp - 4], 0xa
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x14]
push str.FILENAME_08X
push eax
call dword [0x4a2ee0]
add esp, 0xc
mov edi, 1
jmp 0x421850
test edi, edi
lea ecx, [ebp + 0xc]
je 0x421903
call dword [0x4a2ef4]
lea ecx, [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0xc
call fcn.00490234
mov edx, dword [ebp - 0x14]
push edx
lea ecx, [ebp + 0xc]
mov edi, eax
call dword [0x4a2ef0]
test eax, eax
jne 0x421889
lea esi, [eax + 1]
jmp 0x4218c1
test esi, esi
je 0x4218c1
push 0
push str.FILENAME
lea ecx, [ebp + 0xc]
call dword [0x4a2d4c]
cmp eax, 0xffffffff
je 0x4218a6
xor edi, edi
jmp 0x4218c1
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp + 0x10]
call dword [0x4a2db0]
push 0x4a7f18
lea ecx, [ebp + 0x10]
call dword [0x4a2dbc]
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0xa
call dword [0x4a2ee8]
jmp 0x421850
test esi, esi
je 0x4219a7
mov edx, dword [ebp + 0x10]
push edx
call dword [0x4a2c00]
mov byte [ebp - 4], 0xf
mov edx, dword [ebx]
mov edx, dword [edx + 0x38]
push eax
mov eax, dword [ebp + 0x14]
push eax
mov ecx, ebx
call edx
test eax, eax
lea ecx, [ebp + 0xc]
sete bl
mov byte [ebp - 4], 0xa
call dword [0x4a2d9c]
test bl, bl
je 0x421962
push 0x4a4090
lea ecx, [ebp + 0xc]
call dword [0x4a2ed8]
lea eax, [ebp + 0xc]
push eax
mov ecx, 4
mov edx, 0x20a
mov byte [ebp - 4], 0x10
call fcn.004230a0
lea ecx, [ebp - 0x14]
call dword [0x4a2ee8]
lea ecx, [ebp + 0x10]
call dword [0x4a2ee8]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x30], vtable.CFileException.0
call dword [0x4a2ee8]
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0xffffffff
call fcn.00490306
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x4a4090
call dword [0x4a2ed8]
lea ecx, [ebp + 0xc]
push ecx
mov ecx, 4
mov edx, 0x20b
mov byte [ebp - 4], 0x11
call fcn.004230a0
push 0x4a4090
lea ecx, [ebp + 0xc]
call dword [0x4a2ed8]
lea edx, [ebp + 0xc]
mov byte [ebp - 4], 0x12
mov eax, dword [ebp - 0x24]
push edx
push eax
call fcn.00423140
int3