Function at 0x409e30
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ecx, dword [esp + 0x70]
mov ebp, dword [esp + 0x78]
test ecx, ecx
je 0x40a193
mov edx, dword [esp + 0x74]
test edx, edx
je 0x40a1bb
mov eax, dword [esp + 0x74]
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
sub esp, 0xc
mov edx, dword [esp + 0x70]
mov dword [esp + 0x34], eax
mov dword [edx], eax
test eax, eax
je 0x40a1dc
test ebp, ebp
je 0x40a172
mov edx, dword [ebp + 4]
test edx, edx
je 0x40a08f
mov edi, dword [esp + 0x34]
mov ecx, dword [edi + 0x3c]
add ecx, edi
movzx eax, word [ecx + 0x14]
mov ebx, dword [ecx + 0x54]
mov dword [esp + 0x38], ecx
movzx ecx, word [ecx + 6]
test ecx, ecx
je 0x409ed2
add eax, edi
lea ecx, [ecx + ecx*4]
lea esi, [eax + ecx*8]
lea esi, [esi]
mov ecx, dword [eax + 0x20]
add ecx, dword [eax + 0x24]
cmp ebx, ecx
cmovb ebx, ecx
add eax, 0x28
cmp esi, eax
jne 0x409ec0
mov eax, dword [esp + 0x34]
xor esi, esi
lea edi, [eax + ebx + 0x10000]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
jmp 0x409ef3
mov edx, dword [ebp + 4]
imul eax, edx, 0x105
mov dword [esp], edi
add esi, 1
add edi, 0x10000
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 4], eax
call ebx
sub esp, 0x10
cmp esi, 0x270f
ja 0x40a145
test eax, eax
je 0x409ef0
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x80]
test eax, eax
je 0x40a07a
mov edx, dword [esp + 0x34]
mov dword [esp + 0x24], 0
add eax, edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x2c]
sub eax, edx
mov dword [esp + 0x30], eax
lea esi, [esi]
mov eax, dword [esp + 0x28]
mov esi, dword [eax + 0xc]
mov dword [esp + 0x48], eax
test esi, esi
je 0x40a08f
mov eax, dword [ebp + 4]
add esi, dword [esp + 0x34]
mov dword [esp + 0x20], esi
test eax, eax
je 0x40a110
xor ebx, ebx
jmp 0x409fa7
mov byte [edi], 0x3d
add ebx, 1
cmp ebx, dword [ebp + 4]
jae 0x40a110
mov eax, dword [ebp]
mov esi, dword [eax + ebx*4]
mov dword [esp + 4], 0x3d
mov dword [esp], esi
call sub.msvcrt.dll_strchr
mov edi, eax
test eax, eax
je 0x409f9b
mov byte [eax], 0
mov eax, dword [esp + 0x20]
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x409f98
lea esi, [edi + 1]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
add eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0040b320
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.Replacing__s_with__s
mov dword [esp + 8], eax
mov dword [esp], 0x40e496
call dword [0x40d0f0]
mov eax, dword [esp + 0x30]
mov dword [esp + 8], 4
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
add eax, 0xc
mov dword [esp], eax
call fcn.0040b320
lea eax, [esp + 0x48]
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.0040b320
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov ecx, dword [esp + 0x24]
lea eax, [ecx + eax + 1]
mov dword [esp + 0x24], eax
jmp 0x409f98
mov dword [esp + 4], str.Couldnt_find_import_table__cant_hook_DLL_n
mov dword [esp], 0x40e496
call dword [0x40d0f0]
mov dword [esp + 4], str.Finished_processing_IAT_hooks
mov dword [esp], 0x40e496
call dword [0x40d0f0]
mov eax, dword [esp + 0x70]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0040b440
mov eax, dword [esp + 0x70]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0040ae90
mov edx, dword [esp + 0x70]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov edx, dword [edx]
mov dword [esp], edx
call eax
sub esp, 0xc
mov dword [esp + 4], str.Finished_resolving_imports
mov dword [esp], 0x40e496
call dword [0x40d0f0]
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call fcn.0040b930
mov edx, dword [esp + 0x70]
mov dword [edx + 4], eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x38]
mov edx, ecx
mov eax, dword [eax + 0x84]
sub edx, dword [esp + 0x3c]
add edx, 0x14
cmp eax, edx
seta dl
test eax, eax
sete al
add ecx, 0x14
or dl, al
mov dword [esp + 0x28], ecx
jne 0x409f68
jmp 0x40a08f
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x409f32
mov dword [esp + 8], str.module_replace_dll_iat
mov dword [esp + 4], 0x39
mov dword [esp], str.src_main_launcher_module.c
call fcn.00409750
jmp 0x409f32
mov dword [esp + 8], str.module_replace_dll_iat
mov dword [esp + 4], 0x12
mov dword [esp], str.src_main_launcher_module.c
call fcn.00409750
jmp 0x409e8d
mov dword [esp + 8], str.module_context_init_with_iat_hooks
mov dword [esp + 4], 0xa9
mov dword [esp], str.src_main_launcher_module.c
call fcn.00409750
mov edx, dword [esp + 0x74]
test edx, edx
jne 0x409e53
mov dword [esp + 8], str.module_context_init_with_iat_hooks
mov dword [esp + 4], 0xaa
mov dword [esp], str.src_main_launcher_module.c
call fcn.00409750
jmp 0x409e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], 0
mov ebx, eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
sub esp, 0x1c
cmp ebx, 0x7e
jne 0x40a257
mov eax, dword [esp + 0x74]
mov dword [esp + 4], str._s_is_likely_missing_dependencies
mov dword [esp], 0x40e496
mov dword [esp + 8], eax
call dword [0x40d0f4]
mov dword [esp + 4], str.Do_you_have_vcredist_directx_runtimes_installed_
mov dword [esp], 0x40e496
call dword [0x40d0f4]
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], str._s:_Failed_to_load_game_DLL:__s
mov dword [esp], 0x40e496
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], eax
call dword [0x40d0e8]
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop