Function at 0x10014740
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1a0
push ebx
push ebp
mov ebp, dword [esp + 0x1ac]
push esi
cmp ebp, 7
push edi
jae 0x100147c9
cmp ebp, 3
je 0x100147c9
mov esi, dword [esp + 0x1bc]
xor edx, edx
cmp esi, edx
je 0x100147c9
mov ebx, dword [esp + 0x1b8]
cmp ebx, edx
je 0x100147c9
cmp byte [ebx], 0
je 0x100147c9
push edx
push 0x10000080
push 3
push edx
mov ecx, 0x22
xor eax, eax
mov edi, esi
push 1
push 0x80000000
push ebx
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x100147c9
lea eax, [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x24]
push 4
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
push edi
jne 0x100147d6
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1a0
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x1c], 0x4d4c4150
jne 0x10014802
cmp ebp, 5
je 0x100147c9
push esi
push ebx
call dword [ebp*4 + 0x10047da0]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a0
ret
lea edx, [esp + 0x18]
lea eax, [esp + 0x28]
push edx
push eax
push ebp
call fcn.10017da0
add esp, 0xc
test eax, eax
je 0x100147c9
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.10017e40
mov edi, eax
add esp, 8
test edi, edi
je 0x100147c9
push 1
push ebx
mov ecx, edi
call fcn.10007e00
test eax, eax
je 0x1001495d
mov ecx, dword [0x1004c474]
test ecx, ecx
je 0x10014854
push ebx
push edi
call fcn.10010080
mov ebp, dword [edi + 0x28c]
lea ecx, [edi + 0x6c4]
mov dword [esi + 0x80], ebp
mov eax, dword [edi + 0x6a8]
push 0x7d
push ecx
push esi
mov dword [esp + 0x2c], ebp
mov word [esi + 0x7e], ax
call fcn.10035fc0
mov eax, dword [esi + 0x80]
add esp, 0xc
test eax, eax
jne 0x10014899
mov dword [esi + 0x84], 0
jmp 0x10014955
lea edx, [ebp*4 + 0xa]
push edx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x10], eax
je 0x1001495d
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
je 0x1001495d
test ebp, ebp
mov dword [esi + 0x80], 0
jle 0x10014944
mov ebp, 1
lea ecx, [esp + 0xa8]
push ecx
push ebp
mov ecx, edi
call fcn.100097d0
test eax, eax
je 0x10014938
mov eax, dword [esp + 0x1b4]
lea edx, [esp + 0xa8]
push edx
push eax
call fcn.10017f20
add esp, 8
test eax, eax
je 0x10014938
mov ecx, dword [esp + 0x1b4]
push ebp
push edi
call dword [ecx*4 + 0x10047d84]
mov edx, dword [esi + 0x80]
add esp, 8
mov dword [ebx + edx*4], eax
mov eax, dword [esi + 0x80]
cmp dword [ebx + eax*4], 0
je 0x10014938
inc eax
mov dword [esi + 0x80], eax
mov ecx, dword [esp + 0x20]
inc ebp
lea eax, [ebp - 1]
cmp eax, ecx
jl 0x100148d9
mov ebx, dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [esi + 0x84], ebx
mov dword [esp + 0x14], 1
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x1001497c
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1001497c
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a0
ret