Function at 0x499900
Capabilities:
Link many functions at runtime

Disassembly:
push 0xc
mov eax, 0x4b3306
call fcn.0045461f
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 [0x4f4910], eax
mov al, byte [ebp + 0x3c]
push 0x4c569c
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 0x499984
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 0x4999d9
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 0x4999dc
lea ecx, [ebp + 8]
call fcn.0044a120
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 0x499ad7
push 0x4c5fd0
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 0x499a21
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 0x499a58
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 0x499a5b
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 0x499ad7
push 0x4c5ff8
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 0x499a99
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 0x499ad7
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
jne 0x499b04
push 0x4c6008
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x499acd
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 0x499b04
call edi
sub esp, 0x30
mov ecx, esp
mov dword [0x4f4910], eax
push ebx
lea eax, [ebp + 8]
mov dword [ecx], 0x4cc0d0
push eax
mov dword [ecx + 0x28], 0x4cc070
call fcn.00411254
call fcn.0048b575
add esp, 0x30
jmp 0x499b0d
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.004545ed
ret 0x38