Function at 0x496ea1
Capabilities:
Link many functions at runtime

Disassembly:
push 0xc
mov eax, 0x4b0129
call fcn.0045370f
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 [0x4f0910], eax
mov al, byte [ebp + 0x3c]
push 0x4c24ac
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 0x496f25
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 0x496f7a
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 0x496f7d
lea ecx, [ebp + 8]
call fcn.00449bf3
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 0x497078
push 0x4c2d7c
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 0x496fc2
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 0x496ff9
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 0x496ffc
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 0x497078
push 0x4c2da4
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 0x49703a
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 0x497078
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
jne 0x4970a5
push 0x4c2db4
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x49706e
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 0x4970a5
call edi
sub esp, 0x30
mov ecx, esp
mov dword [0x4f0910], eax
push ebx
lea eax, [ebp + 8]
mov dword [ecx], 0x4c8e80
push eax
mov dword [ecx + 0x28], 0x4c8e20
call fcn.0041122d
call fcn.00489fe7
add esp, 0x30
jmp 0x4970ae
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.004536dd
ret 0x38