Function at 0x46ee26
Capabilities:
Link many functions at runtime

Disassembly:
push 0xc
mov eax, 0x4b227e
call fcn.00473cee
mov esi, ecx
mov eax, dword [ebp + 0x38]
mov dword [ebp - 0x14], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
mov dword [ebp - 4], ebx
call edi
mov dword [0x4f2920], eax
mov al, byte [ebp + 0x3c]
push 0x4bfb90
push str.Kernel32
mov byte [esi + 0x14], al
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x46eeaa
cmp dword [ebp + 0x20], 8
mov cl, byte [esi + 0x14]
lea edx, [ebp + 0xc]
cmovae edx, dword [ebp + 0xc]
xor eax, eax
test cl, cl
sete al
push ebx
push 0x80
mov dword [ebp - 0x18], 0xc0000000
add eax, 2
push eax
push ebx
test cl, cl
push ebx
mov eax, SysReAllocStringLen
cmovne eax, dword [ebp - 0x18]
push eax
push edx
call dword [ebp - 0x10]
jmp 0x46eeff
push str.CreateFileA
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x46ef02
lea ecx, [ebp + 8]
call fcn.0044970c
mov cl, byte [esi + 0x14]
mov edx, eax
xor eax, eax
test cl, cl
sete al
push ebx
push 0x80
mov dword [ebp - 0x10], 0xc0000000
add eax, 2
push eax
push ebx
test cl, cl
push ebx
mov eax, SysReAllocStringLen
cmovne eax, dword [ebp - 0x10]
push eax
push edx
call dword [ebp - 0x18]
mov dword [esi + 0xc], eax
cmp dword [esi + 0xc], 0xffffffff
je 0x46effd
push 0x4c15c0
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 4
mov dword [ebp - 0x10], eax
pop edx
test eax, eax
je 0x46ef47
mov ecx, dword [ebp - 0x14]
cmp byte [esi + 0x14], bl
push ebx
push dword [ecx]
push ebx
push 2
pop eax
cmovne eax, edx
push eax
push ebx
push dword [esi + 0xc]
call dword [ebp - 0x10]
jmp 0x46ef7e
push str.CreateFileMappingA
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
test edx, edx
je 0x46ef81
mov ecx, dword [ebp - 0x14]
cmp byte [esi + 0x14], bl
push ebx
push dword [ecx]
push ebx
push 2
pop eax
push 4
pop ecx
cmovne eax, ecx
push eax
push ebx
push dword [esi + 0xc]
call edx
mov dword [esi + 0x10], eax
cmp dword [esi + 0x10], ebx
je 0x46effd
push 0x4c15e8
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
test ecx, ecx
je 0x46efbf
mov eax, dword [ebp - 0x14]
cmp byte [esi + 0x14], bl
push dword [eax]
push ebx
push ebx
push 4
pop eax
push 2
pop edx
cmovne eax, edx
push eax
push dword [esi + 0x10]
call ecx
mov dword [esi + 4], eax
cmp dword [esi + 4], ebx
je 0x46effd
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
jne 0x46f02a
push 0x4c15f8
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x46eff3
push ebx
push dword [esi + 0xc]
call eax
mov ecx, dword [ebp - 0x14]
mov dword [ecx], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x46f02a
call edi
sub esp, 0x30
mov ecx, esp
mov dword [0x4f2920], eax
push ebx
lea eax, [ebp + 8]
mov dword [ecx], 0x4cb780
push eax
mov dword [ecx + 0x28], 0x4cb720
call fcn.004110fd
call fcn.0045fb4d
add esp, 0x30
jmp 0x46f033
mov dword [esi + 0x18], eax
mov byte [esi + 8], 1
mov bl, 1
lea ecx, [ebp + 8]
call fcn.00401b80
mov al, bl
call fcn.00473cbc
ret 0x38