Function at 0x456707
Capabilities:
Link many functions at runtime

Disassembly:
push 0xc
mov eax, 0x4a898c
call fcn.0045a4b6
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 [0x4d7a20], eax
mov al, byte [ebp + 0x3c]
push 0x4b4c5c
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 0x45678b
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 0x4567e0
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 0x4567e3
lea ecx, [ebp + 8]
call fcn.0041304b
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 0x4568de
push 0x4b5234
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 0x456828
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 0x45685f
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 0x456862
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 0x4568de
push 0x4b525c
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 0x4568a0
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 0x4568de
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
jne 0x45690b
push 0x4b526c
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4568d4
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 0x45690b
call edi
sub esp, 0x30
mov ecx, esp
mov dword [0x4d7a20], eax
push ebx
lea eax, [ebp + 8]
mov dword [ecx], 0x4c0f30
push eax
mov dword [ecx + 0x28], 0x4c0ed0
call fcn.00408e82
call fcn.004495c7
add esp, 0x30
jmp 0x456914
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.0045a484
ret 0x38