Function at 0x456a3f
Capabilities:
Link many functions at runtime

Disassembly:
push 0xc
mov eax, 0x4a8603
call fcn.0045a7f6
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 [0x4d6900], eax
mov al, byte [ebp + 0x3c]
push 0x4b40bc
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 0x456ac3
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 0x456b18
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 0x456b1b
lea ecx, [ebp + 8]
call fcn.00412e19
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 0x456c16
push 0x4b5744
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 0x456b60
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 0x456b97
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 0x456b9a
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 0x456c16
push 0x4b576c
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 0x456bd8
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 0x456c16
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
jne 0x456c43
push 0x4b577c
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x456c0c
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 0x456c43
call edi
sub esp, 0x30
mov ecx, esp
mov dword [0x4d6900], eax
push ebx
lea eax, [ebp + 8]
mov dword [ecx], 0x4c13f0
push eax
mov dword [ecx + 0x28], 0x4c1390
call fcn.00408e82
call fcn.004485b6
add esp, 0x30
jmp 0x456c4c
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.0045a7c4
ret 0x38