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

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x27
add esp, 0xfffff004
push eax
dec eax
jne 0x5000345d
mov eax, dword [ebp - 4]
add esp, 0xfffff7e0
push ebx
push esi
push edi
lea eax, [ebp - 0x1b800]
xor ecx, ecx
mov edx, 0x1b800
call sym.rtl120.bpl__System__FillChar_qqrpvib
lea eax, [ebp - 0x1f824]
xor ecx, ecx
mov edx, 0x4000
call sym.rtl120.bpl__System__FillChar_qqrpvib
xor eax, eax
mov dword [ebp - 0x1b808], eax
mov byte [ebp - 0x1b801], 1
mov edi, dword [0x500a4a40]
jmp 0x50003533
mov eax, edi
call fcn.50002e80
mov ebx, eax
test ebx, ebx
je 0x50003530
mov eax, ebx
sub eax, 4
mov esi, dword [eax]
test esi, 1
jne 0x50003523
test esi, 4
je 0x500034e0
push ebp
mov eax, ebx
call fcn.50003294
pop ecx
jmp 0x50003523
cmp dword [ebp - 0x1b808], 0x1000
jge 0x50003523
and esi, 0xfffffff0
sub esi, 4
mov dword [ebp - 0x1b814], esi
mov eax, ebx
call sym.rtl120.bpl__System_SysUnregisterExpectedMemoryLeak_qqrpv
test al, al
jne 0x50003523
mov byte [ebp - 0x1b801], 0
mov eax, dword [ebp - 0x1b808]
mov edx, dword [ebp - 0x1b814]
mov dword [ebp + eax*4 - 0x1f824], edx
inc dword [ebp - 0x1b808]
mov eax, ebx
call fcn.50002e5c
mov ebx, eax
test ebx, ebx
jne 0x500034be
mov edi, dword [edi + 4]
cmp edi, 0x500a4a3c
jne 0x500034b1
mov ebx, dword [0x500a6ae4]
jmp 0x5000357e
mov eax, ebx
add eax, 0x10
call sym.rtl120.bpl__System_SysUnregisterExpectedMemoryLeak_qqrpv
test al, al
jne 0x5000357b
mov byte [ebp - 0x1b801], 0
mov esi, dword [ebx + 0xc]
and esi, 0xfffffff0
sub esi, 4
sub esi, 0x10
mov eax, dword [ebp - 0x1b808]
mov dword [ebp + eax*4 - 0x1f824], esi
inc dword [ebp - 0x1b808]
mov ebx, dword [ebx + 4]
cmp ebx, 0x500a6ae0
je 0x50003592
cmp dword [ebp - 0x1b808], 0x1000
jl 0x50003547
cmp byte [ebp - 0x1b801], 0
jne 0x5000382e
mov byte [ebp - 0x1b809], 0
xor eax, eax
mov dword [ebp - 0x1b818], eax
mov eax, dword [0x5009c064]
call sym.rtl120.bpl__System__PCharLen_qqrpc
mov ecx, eax
lea edx, [ebp - 0x27824]
mov eax, dword [0x5009c064]
call fcn.50003018
mov ebx, eax
mov dword [ebp - 0x1b810], 0x37
mov dword [ebp - 0x1b820], 0x5009c0aa
lea eax, [ebp - 0x1b004]
mov dword [ebp - 0x1b824], eax
mov eax, dword [ebp - 0x1b820]
movzx eax, word [eax]
sub eax, 4
mov dword [ebp - 0x1b81c], eax
mov byte [ebp - 0x1b80a], 0
mov edi, 0xff
mov eax, dword [ebp - 0x1b824]
mov esi, eax
lea eax, [ebp - 0x20025]
cmp ebx, eax
ja 0x5000374c
cmp dword [esi], 0
jbe 0x5000373f
cmp byte [ebp - 0x1b809], 0
jne 0x50003653
mov eax, dword [0x5009c068]
call sym.rtl120.bpl__System__PCharLen_qqrpc
mov ecx, eax
mov edx, ebx
mov eax, dword [0x5009c068]
call fcn.50003018
mov ebx, eax
mov byte [ebp - 0x1b809], 1
cmp byte [ebp - 0x1b80a], 0
jne 0x500036b2
mov byte [ebx], 0xd
inc ebx
mov byte [ebx], 0xa
inc ebx
mov eax, dword [ebp - 0x1b818]
inc eax
mov edx, ebx
call fcn.50002efc
mov ebx, eax
mov byte [ebx], 0x20
inc ebx
mov byte [ebx], 0x2d
inc ebx
mov byte [ebx], 0x20
inc ebx
mov edx, ebx
mov eax, dword [ebp - 0x1b81c]
call fcn.50002efc
mov ebx, eax
mov eax, dword [0x5009c070]
call sym.rtl120.bpl__System__PCharLen_qqrpc
mov ecx, eax
mov edx, ebx
mov eax, dword [0x5009c070]
call fcn.50003018
mov ebx, eax
mov byte [ebp - 0x1b80a], 1
jmp 0x500036ba
mov byte [ebx], 0x2c
inc ebx
mov byte [ebx], 0x20
inc ebx
mov eax, edi
sub eax, 1
jb 0x500036c8
je 0x500036e4
dec eax
je 0x50003700
jmp 0x5000371c
mov eax, dword [0x5009c074]
call sym.rtl120.bpl__System__PCharLen_qqrpc
mov ecx, eax
mov edx, ebx
mov eax, dword [0x5009c074]
call fcn.50003018
mov ebx, eax
jmp 0x50003728
mov eax, dword [0x5009c078]
call sym.rtl120.bpl__System__PCharLen_qqrpc
mov ecx, eax
mov edx, ebx
mov eax, dword [0x5009c078]
call fcn.50003018
mov ebx, eax
jmp 0x50003728
mov eax, dword [0x5009c07c]
call sym.rtl120.bpl__System__PCharLen_qqrpc
mov ecx, eax
mov edx, ebx
mov eax, dword [0x5009c07c]
call fcn.50003018
mov ebx, eax
jmp 0x50003728
mov eax, dword [esi - 4]
mov edx, ebx
call fcn.50003030
mov ebx, eax
mov byte [ebx], 0x20
inc ebx
mov byte [ebx], 0x78
inc ebx
mov byte [ebx], 0x20
inc ebx
mov eax, dword [esi]
mov edx, ebx
call fcn.50002efc
mov ebx, eax
dec edi
sub esi, 8
cmp edi, 0xffffffff
jne 0x50003612
mov eax, dword [ebp - 0x1b81c]
mov dword [ebp - 0x1b818], eax
add dword [ebp - 0x1b824], 0x56000800
push esi
push edi
push ebx
push ebp
sub esp, 0x28
mov ebp, 0x5009d38b
xor edx, edx
mov eax, dword [ebp]
call fcn.50003ae5
mov dword [esp], eax
mov dword [esp + 0x14], 0
push eax
push eax
xor eax, eax
lea edx, [esp + 0x1c]
call fcn.50003ae5
mov eax, dword [ebp + 0x24]
push eax
push 0x40
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov ebx, eax
mov eax, ebx
push eax
push eax
mov edx, dword [ebp + 0x24]
call fcn.50003c79
mov edi, dword [esp + 0x14]
movzx edx, word [edi]
test edx, edx
je 0x500037c7
xor esi, esi
movzx edx, word [edi + esi*2]
mov word [ebx + esi*2], dx
inc esi
movzx ecx, word [edi + esi*2]
test ecx, ecx
jne 0x500037b6
movzx esi, word [ebx]
xor edx, edx
mov ecx, dword [ebp + 0x30]
test esi, esi
je 0x500037e0
inc edx
lea edi, [ebx + edx*2]
movzx esi, word [edi]
test esi, esi
jne 0x500037d3
jmp 0x500037e2
mov edi, ebx
movzx esi, word [edi - 2]
cmp esi, 0x5c
je 0x500037fc
xor esi, esi
mov word [ebx + edx*2], si
dec edx
movzx edi, word [ebx + edx*2 - 2]
cmp edi, 0x5c
jne 0x500037eb
cmp byte [ecx], 0
je 0x50003813
xor esi, esi
movsx edi, byte [esi + ecx]
inc esi
mov word [ebx + edx*2], di
inc edx
cmp byte [esi + ecx], 0
jne 0x50003803
xor edx, edx
xor ecx, ecx
inc ecx
push edx
push 0x80
push 3
push edx
push ecx
push ecx
push ebx
call dword [sym.imp.kernel32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x5000398d
dec dword [edi]
test byte [eax + 1], bl
add byte [eax], al
push 0
push edi