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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4dbf0c
mov eax, dword fs:[0]
push eax
sub esp, 0x3d8
mov eax, dword [0x50e018]
xor eax, esp
mov dword [esp + 0x3d0], eax
push ebx
push esi
push edi
mov eax, dword [0x50e018]
xor eax, esp
push eax
lea eax, [esp + 0x3e8]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x1c]
mov dword [esp + 0x18], edi
cmp eax, 0x103
jg 0x40fcc1
je 0x40fca8
add eax, 0x7ffdff9d
cmp eax, 3
ja case.default.0x40f98c
jmp dword [eax*4 + 0x40fe3c]
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push ecx
lea ecx, [esp + 0x304]
call fcn.004111d0
lea esi, [esp + 0x14]
mov dword [esp + 0x3f0], 2
call fcn.004047a0
lea edx, [esp + 0x300]
push edx
mov ecx, eax
mov byte [esp + 0x3f4], 3
call fcn.0040ffd0
add esp, 4
mov eax, esi
mov byte [esp + 0x3f0], 2
call fcn.004052f0
cmp dword [edi + 0x3c], 0
je 0x40fa20
lea eax, [esp + 0x300]
push eax
lea ecx, [esp + 0x374]
push ecx
call dword [sym.imp.brbase.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_base::SysWideToUTF8_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
add esp, 8
mov byte [esp + 0x3f0], 4
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x370]
call fcn.004054e0
lea ecx, [esp + 0x300]
call fcn.00410a80
jmp 0x40fe14
cmp dword [edi + 0x3c], 0
je 0x40fe14
mov ecx, dword [edi + 0x3c]
mov eax, dword [esi]
mov edx, dword [ecx]
mov eax, dword [eax + 8]
mov edx, dword [edx]
push eax
call edx
jmp 0x40fe14
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push ecx
lea ecx, [esp + 0x304]
call fcn.004111d0
push 0
push 0
push 0
lea edx, [esp + 0x250]
mov ebx, 5
push edx
mov dword [esp + 0x400], ebx
call fcn.00405200
mov ecx, str._custom_js_
mov esi, eax
mov byte [esp + 0x3f0], 6
call fcn.00405280
cmp dword [esp + 0x314], 8
mov esi, eax
mov eax, dword [esp + 0x300]
jae 0x40faae
lea eax, [esp + 0x300]
call fcn.004109e0
lea ecx, [esp + 0x244]
mov byte [esp + 0x3f0], bl
call fcn.00458570
lea ecx, [esp + 0x300]
call fcn.00410a80
jmp 0x40fe14
xor ebx, ebx
mov eax, 0xf
mov dword [esp + 0x330], eax
mov dword [esp + 0x32c], ebx
mov byte [esp + 0x31c], bl
mov dword [esp + 0x3f0], 7
mov dword [esp + 0x34c], eax
mov dword [esp + 0x348], ebx
mov byte [esp + 0x338], bl
mov byte [esp + 0x3f0], 8
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push ecx
lea ecx, [esp + 0x358]
call fcn.004111d0
mov byte [esp + 0x3f0], 9
cmp dword [edi + 0x3c], ebx
je 0x40fb82
lea edx, [esp + 0x354]
push edx
lea eax, [esp + 0x3c8]
push eax
call dword [sym.imp.brbase.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_base::SysWideToUTF8_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
add esp, 8
mov byte [esp + 0x3f0], 0xa
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
lea esi, [esp + 0x338]
push esi
push eax
mov eax, dword [edx + 0xc]
call eax
lea ecx, [esp + 0x3c4]
mov byte [esp + 0x3f0], 9
call fcn.004054e0
lea ecx, [esp + 0x38c]
push str.json__
push ecx
lea ebx, [esp + 0x340]
call fcn.00410000
push eax
mov edx, 0x4e492c
lea esi, [esp + 0x3b4]
mov byte [esp + 0x3fc], 0xb
call fcn.004100d0
add esp, 0xc
push eax
lea ecx, [esp + 0x320]
mov byte [esp + 0x3f4], 0xc
call fcn.004045b0
mov ecx, esi
call fcn.004054e0
mov bl, 9
lea ecx, [esp + 0x38c]
mov byte [esp + 0x3f0], bl
call fcn.004054e0
movzx edx, byte [0x5130be]
push 1
push 7
push edx
lea eax, [esp + 0x28]
push eax
call fcn.00405200
mov ecx, str.ExecuteScript:
mov esi, eax
mov byte [esp + 0x3f0], 0xd
call fcn.00405280
mov esi, eax
lea eax, [esp + 0x31c]
call fcn.004052b0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3f0], bl
call fcn.00458570
lea ecx, [esp + 0x31c]
push ecx
lea esi, [edi - 0x10]
call fcn.0040f180
test al, al
jne 0x40fc7f
push 0
push 2
push 0
lea edx, [esp + 0x198]
push edx
call fcn.00405200
mov ecx, 0x4e494c
mov esi, eax
mov byte [esp + 0x3f0], 0xe
call fcn.00405280
lea ecx, [esp + 0x18c]
mov byte [esp + 0x3f0], bl
call fcn.00458570
lea ecx, [esp + 0x354]
call fcn.00410a80
lea ecx, [esp + 0x338]
call fcn.004054e0
lea ecx, [esp + 0x31c]
call fcn.004054e0
jmp 0x40fe14
cmp dword [edi + 0x3c], 0
je 0x40fe14
mov ecx, dword [edi + 0x3c]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
jmp 0x40fe14
sub eax, 0x10f
je 0x40fce7
sub eax, 2
je 0x40fcd7
mov eax, 0x80004001
jmp 0x40fe16
mov eax, dword [esi]
mov ecx, dword [eax + 0x38]
or edx, 0xffffffff
mov word [ecx], dx
jmp 0x40fe14
mov edi, dword [edi + 0x20]
mov eax, dword [edi]
mov edx, dword [eax + 0x78]
lea ecx, [esp + 0x10]
push ecx
push edi
call edx
mov eax, dword [esi]
mov ecx, dword [eax + 0x38]
mov edx, dword [ecx + 8]
push edx
lea ecx, [esp + 0x304]
call fcn.004111d0
push 0
mov dword [esp + 0x3f4], 0
mov eax, dword [esi]
mov ecx, dword [eax + 0x18]
mov ebx, dword [ecx + 8]
push 2
push 0
lea edx, [esp + 0xe0]
push edx
call fcn.00405200
mov esi, eax
mov byte [esp + 0x3f0], 1
test esi, esi
je 0x40fd45
lea eax, [esi + 0x10]
jmp 0x40fd47
xor eax, eax
push 0x4e490c
push eax
call fcn.00405c70
mov eax, dword [esp + 0x308]
add esp, 8
cmp dword [esp + 0x314], 8
jae 0x40fd6d
lea eax, [esp + 0x300]
call fcn.004109e0
mov esi, eax
test esi, esi
je 0x40fd7d
lea eax, [esi + 0x10]
jmp 0x40fd7f
xor eax, eax
push 0x4e4674
push eax
call fcn.00405c70
add esp, 8
push ebx
lea ecx, [esi + 0x10]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
lea ecx, [esp + 0xd4]
mov byte [esp + 0x3f0], 0
call fcn.00458570
mov edx, dword [esp + 0x10]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40fdb4
sub eax, esi
sar eax, 1
mov edi, eax
mov eax, dword [esp + 0x310]
push edx
lea ecx, [esp + 0x304]
call fcn.00410150
test eax, eax
jne 0x40fdf9
test ebx, ebx
jns 0x40fdf9
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x3c], 0
je 0x40fdf9
mov ecx, dword [eax + 0x3c]
mov eax, dword [ecx]
mov edx, dword [eax]
push 0x38f
call edx
cmp dword [esp + 0x314], 8
jb 0x40fe14
mov eax, dword [esp + 0x300]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x3e8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, esp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0x24