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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x218
mov ebx, dword [ecx + 0x50]
mov eax, dword [ecx + 0x54]
mov edx, dword [ecx + 0x58]
mov esi, dword [ecx + 0x5c]
mov dword [ecx + 0x50], 2
cmp ebx, 2
jne 0x4048c2
mov eax, dword [ecx + 0x9c]
mov ebx, dword [ecx + 0x84]
cmp ebx, eax
mov dword [esp + 8], eax
jae 0x40546c
mov edx, dword [ecx + 0x98]
mov eax, ebx
shl eax, 5
cmp byte [edx + eax + 0x1c], 0
mov dword [esp + 0x18], edx
je 0x404964
mov eax, dword [edx + eax + 0xc]
mov esi, dword [ecx + 0x80]
lea edi, [ebx + 1]
xor edx, edx
mov dword [esp + 0x10], edi
mov dword [ecx + 0x84], edi
dec eax
mov edi, esi
cmp esi, eax
sete al
setne dl
jmp 0x40497e
movsd xmm1, qword [ecx + 0x70]
movsd xmm0, qword [ecx + 0x78]
movsd xmm2, qword [ecx + 0x60]
mov dword [esp + 4], edx
mov dword [esp + 0x2c], eax
movsd qword [esp + 0x60], xmm1
movsd xmm1, qword [ecx + 0x68]
lea ecx, [esp + 0x50]
movsd qword [esp + 0x68], xmm0
movsd qword [esp + 0x50], xmm2
movsd qword [esp + 0x58], xmm1
mov byte [esp + 0x70], 0
call fcn.00407f60
test eax, eax
je 0x404930
cmp ebx, 1
mov edx, dword [esp + 0x2c]
mov edi, eax
mov dword [esp + 0x50], eax
lea ecx, [esp + 0x50]
cmovne esi, dword [esp + 4]
push esi
call fcn.00434be0
add esp, 4
test ebx, ebx
jne 0x40493a
jmp 0x405462
xor edi, edi
test ebx, ebx
je 0x405462
cmp dword [esp + 4], 0
je 0x405462
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x405462
push eax
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
jmp 0x405462
lea eax, [ebx + 1]
mov edx, 1
mov dword [ecx + 0x84], eax
mov dword [esp + 0x10], eax
xor eax, eax
mov edi, dword [ecx + 0x80]
add edi, edx
mov edx, dword [ecx + 0x90]
movsd xmm1, qword [esp + 0x178]
movsd xmm2, qword [esp + 0x180]
movsd xmm0, qword [esp + 0x188]
movsd xmm3, qword [esp + 0x168]
mov esi, dword [ecx + 0x8c]
mov dword [esp + 4], eax
test al, al
mov eax, dword [esp + 8]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], edx
mov edx, dword [ecx + 0x94]
movsd qword [esp + 0x148], xmm1
movsd xmm1, qword [esp + 0x170]
movsd qword [esp + 0x150], xmm2
movsd xmm2, qword [esp + 0x50]
movsd qword [esp + 0x158], xmm0
movsd qword [esp + 0x138], xmm3
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x190]
movsd qword [esp + 0x140], xmm1
movsd xmm1, qword [esp + 0x58]
movsd qword [esp + 0x108], xmm2
movsd xmm2, qword [esp + 0x68]
mov dword [esp + 0x160], edx
mov edx, dword [esp + 0x78]
movsd qword [esp + 0x110], xmm1
movsd xmm1, qword [esp + 0x60]
movsd qword [esp + 0x120], xmm2
mov dword [esp + 0x130], edx
mov edx, dword [ecx + 0xa0]
movsd qword [esp + 0x118], xmm1
movsd xmm1, qword [esp + 0x70]
movsd qword [esp + 0x128], xmm1
je 0x404c4a
movsd xmm1, qword [esp + 0x140]
mov dword [esp + 0x170], 3
movsd xmm0, qword [esp + 0x138]
movsd xmm2, qword [esp + 0x150]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x160]
mov cl, byte [esp + 0x27]
cmp ebx, esi
movsd qword [esp + 0x17c], xmm1
movsd xmm1, qword [esp + 0x148]
movsd qword [esp + 0x18c], xmm2
mov dword [esp + 0x19c], edx
movsd qword [esp + 0x174], xmm0
mov edx, dword [esp + 0x130]
movsd xmm2, qword [esp + 0x108]
movsd qword [esp + 0x184], xmm1
movsd xmm1, qword [esp + 0x158]
movsd qword [esp + 0x194], xmm1
movsd xmm1, qword [esp + 0x110]
mov dword [esp + 0x1a0], 8
mov dword [esp + 0x1a4], 0
mov dword [esp + 0x1a8], 8
mov dword [esp + 0x1ac], 8
mov dword [esp + 0x1b8], 2
mov dword [esp + 0x1e4], edx
movsd qword [esp + 0x1bc], xmm2
movsd xmm2, qword [esp + 0x120]
mov edx, dword [esp + 0x20]
movsd qword [esp + 0x1c4], xmm1
movsd xmm1, qword [esp + 0x118]
movsd qword [esp + 0x1d4], xmm2
movsd qword [esp + 0x1cc], xmm1
movsd xmm1, qword [esp + 0x128]
movsd qword [esp + 0x1dc], xmm1
mov dword [esp + 0x1e8], edi
mov dword [esp + 0x1ec], 0
mov dword [esp + 0x1f0], ebx
mov dword [esp + 0x1f4], esi
mov dword [esp + 0x1f8], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x1fc], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x200], edx
mov dword [esp + 0x204], eax
mov eax, dword [esp + 0x40]
movzx edx, word [esp + 0x25]
mov dword [esp + 0x208], eax
mov eax, dword [esp + 4]
mov byte [esp + 0x20c], al
mov word [esp + 0x20d], dx
mov byte [esp + 0x20f], cl
jne 0x404e07
lea ecx, [esp + 0x168]
mov dword [esp + 0x170], 3
call fcn.00401f70
mov eax, dword [esp + 0x1b8]
xor edi, edi
test eax, eax
je 0x4053d8
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 8]
cmp eax, 2
je 0x4053ec
xor edi, edi
mov dword [esp + 0x10], edx
jmp 0x4053af
movsd xmm1, qword [esp + 0x140]
mov dword [esp + 0x58], 3
mov ecx, dword [esp + 0x160]
movsd xmm0, qword [esp + 0x138]
movsd xmm2, qword [esp + 0x150]
movsd qword [esp + 0x64], xmm1
movsd xmm1, qword [esp + 0x148]
mov dword [esp + 0x84], ecx
movsd qword [esp + 0x74], xmm2
movsd qword [esp + 0x5c], xmm0
mov ecx, dword [esp + 0x130]
movsd xmm2, qword [esp + 0x108]
movsd qword [esp + 0x6c], xmm1
movsd xmm1, qword [esp + 0x158]
movsd qword [esp + 0x7c], xmm1
movsd xmm1, qword [esp + 0x110]
mov dword [esp + 0x88], 8
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 8
mov dword [esp + 0x94], 8
mov dword [esp + 0xa0], 2
mov dword [esp + 0xcc], ecx
movsd qword [esp + 0xa4], xmm2
movsd xmm2, qword [esp + 0x120]
mov ecx, dword [esp + 0x20]
movsd qword [esp + 0xac], xmm1
movsd xmm1, qword [esp + 0x118]
movsd qword [esp + 0xbc], xmm2
movsd qword [esp + 0xb4], xmm1
movsd xmm1, qword [esp + 0x128]
movsd qword [esp + 0xc4], xmm1
mov dword [esp + 0xd0], edi
mov dword [esp + 0xd4], 0
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xdc], esi
mov dword [esp + 0xe0], ecx
mov ecx, dword [esp + 0x34]
lea ebx, [esp + 0x168]
lea esi, [esp + 0x50]
mov dword [esp + 0xe4], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0xe8], ecx
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], edx
mov eax, dword [esp + 4]
mov dl, byte [esp + 0x27]
movzx ecx, word [esp + 0x25]
mov byte [esp + 0xf4], al
mov byte [esp + 0xf7], dl
mov word [esp + 0xf5], cx
nop word [eax + eax]
mov ecx, ebx
mov edx, esi
call fcn.00403c70
cmp byte [esp + 0x168], 1
je 0x405222
cmp byte [esp + 0x169], 1
jne 0x405263
mov ecx, esi
call fcn.00404840
test eax, eax
je 0x404dd0
mov edi, eax
jmp 0x405229
inc edi
mov dword [esp + 0xc], esi
mov dword [esp + 0xf8], edi
mov edx, dword [esp + 8]
mov edi, ebx
cmp ebx, edx
jae 0x4054a5
mov eax, dword [esp + 0x18]
mov edx, edi
shl edx, 5
mov dword [esp + 0x3c], edx
mov edx, dword [eax + edx + 0xc]
mov ebx, edx
shl ebx, 4
js 0x4054cb
test edx, edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], edi
je 0x404f69
mov ecx, dword [esp + 0x3c]
mov esi, dword [eax + ecx + 4]
mov eax, dword [0x44210c]
test eax, eax
jne 0x404e70
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x4054fb
mov dword [0x44210c], eax
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x4054fb
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x44], eax
add esi, 0x14
mov ebx, eax
mov dword [esp + 0x1c], eax
lea edx, [ecx - 1]
mov dword [esp + 0x48], ecx
lea ecx, [ecx*8]
mov dword [esp + 0x4c], 0
and edx, 0x1fffffff
inc edx
mov dword [esp + 0x14], edx
lea edx, [ecx + ecx*2]
jmp 0x404edf
mov eax, dword [esi - 4]
xor ecx, ecx
mov dword [ebx], ecx
mov dword [ebx + 4], edi
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
add esi, 0x18
add ebx, 0x10
add edx, 0xffffffe8
je 0x404f5f
mov edi, dword [esi - 8]
cmp dword [esi - 0xc], 1
jne 0x404ec0
mov eax, dword [esi]
mov dword [esp + 0x2c], edi
test eax, eax
mov dword [esp + 4], eax
js 0x4054cb
mov edi, 1
mov dword [esp + 0xfc], edx
je 0x404f39
mov eax, dword [0x44210c]
test eax, eax
jne 0x404f23
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x4054d2
mov dword [0x44210c], eax
push dword [esp + 4]
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov edi, eax
test eax, eax
je 0x4054d2
push dword [esp + 4]
push dword [esp + 0x30]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x10]
add esp, 0xc
mov edx, dword [esp + 0xfc]
mov ecx, 1
jmp 0x404ec5
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
jmp 0x404f83
mov dword [esp + 0x44], 4
mov dword [esp + 0x48], 0
xor eax, eax
mov dword [esp + 0x1c], 4
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x44]
mov dword [esp + 0x14], eax
mov dword [esp + 0x4c], eax
call fcn.004010c0
test eax, eax
mov ebx, esi
je 0x40505a
mov ecx, dword [eax + 8]
mov ebx, dword [esp + 0xc]
test ecx, ecx
mov dword [esp + 4], ecx
je 0x40505a
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 4]
mov edx, dword [eax]
xor eax, eax
lea esi, [ecx + 1]
mov ecx, ebx
jmp 0x404fdf
mov eax, edi
mov edi, ebx
inc eax
mov ecx, edi
mov ebx, edi
mov edi, eax
sub ecx, eax
jbe 0x404fec
shr ecx, 1
mov edi, ecx
add edi, eax
cmp dword [edx + edi*4], esi
jb 0x404fd0
jne 0x404fd5
cmp edi, dword [esp + 4]
mov ebx, dword [esp + 0xc]
je 0x40505a
jae 0x4054b6
mov ecx, dword [edx + edi*4]
mov ebx, dword [esp + 0xc]
cmp ecx, esi
jb 0x40505a
mov esi, dword [esp + 4]
lea eax, [edx + edi*4 + 4]
shl edi, 2
mov ebx, ecx
shl esi, 2
sub esi, edi
add esi, 0xfffffffc
mov ecx, dword [esp + 0xc]
cmp ecx, ebx
jbe 0x405040
mov edx, dword [esp + 8]
cmp edx, ebx
jbe 0x405494
mov edx, dword [esp + 0x18]
mov ecx, ebx
shl ecx, 5
cmp byte [edx + ecx + 0x1c], 0
jne 0x40505a
test esi, esi
je 0x405056
mov ebx, dword [eax]
add eax, 4
add esi, 0xfffffffc
mov ecx, dword [esp + 0xc]
cmp ecx, ebx
ja 0x405024
jmp 0x405040
mov ebx, dword [esp + 0xc]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x3c]
mov eax, dword [esi + edi + 0x10]
mov ecx, dword [esi + edi + 0x14]
mov edx, dword [esi + edi + 0x18]
mov dword [esi + edi + 0x10], 0
test eax, eax
je 0x4054e2
mov dword [esp + 0x58], 3
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
imul ecx, edx, 0x38
mov dword [esp + 0x90], eax
mov edx, dword [esp + 0xf8]
add ecx, eax
mov dword [esp + 0x94], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0xa0], 2
mov dword [esp + 0xd0], edx
mov dword [esp + 0xd4], 0
mov edx, dword [esp + 0x20]
mov dword [esp + 0xd8], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xe0], edx
mov edx, dword [esp + 8]
mov dword [esp + 0xe4], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xe8], esi
lea esi, [esp + 0x100]
mov dword [esp + 0xec], edx
mov dword [esp + 0xf0], ecx
mov byte [esp + 0xf4], 0
nop
mov ecx, esi
lea edx, [esp + 0x50]
call fcn.00403c70
cmp byte [esp + 0x100], 1
je 0x4052c6
cmp byte [esp + 0x101], 1
jne 0x405155
lea ecx, [esp + 0x50]
call fcn.00404840
test eax, eax
je 0x405120
jmp 0x4052cf
lea ecx, [esp + 0x50]
call fcn.00401f70
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x405191
cmp eax, 2
je 0x40519d
cmp dword [esp + 0xa8], 0
je 0x405191
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x405191
push eax
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
lea ecx, [esp + 0xb0]
call fcn.00402030
cmp dword [esp + 0x14], 0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x1f0], ebx
je 0x4051f0
shl dword [esp + 0x14], 4
lea esi, [ecx + 8]
jmp 0x4051ca
add esi, 0x10
add dword [esp + 0x14], 0xfffffff0
je 0x4051f0
cmp dword [esi - 8], 0
je 0x4051c0
cmp dword [esi], 0
je 0x4051c0
mov eax, dword [esi - 4]
test eax, eax
je 0x4051c0
push eax
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [esp + 0x1c]
jmp 0x4051c0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x405211
mov edx, 0x10
mul edx
test eax, eax
je 0x405211
push ecx
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
mov esi, dword [esp + 0xc]
cmp ebx, esi
jne 0x404e13
jmp 0x404c06
mov edi, dword [esp + 0x16c]
lea ecx, [esp + 0x50]
call fcn.00401f70
mov eax, dword [esp + 0xa0]
mov esi, dword [esp + 8]
mov edx, dword [esp + 0x10]
test eax, eax
je 0x4053d4
cmp eax, 2
je 0x4053ec
mov ebx, edx
cmp dword [esp + 0xa8], 0
jne 0x4052a4
jmp 0x40544a
lea ecx, [esp + 0x50]
call fcn.00401f70
mov eax, dword [esp + 0xa0]
xor edi, edi
test eax, eax
je 0x405442
cmp eax, 2
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 8]
mov edx, dword [esp + 0x10]
je 0x4053f0
mov ebx, edx
xor edi, edi
cmp dword [esp + 0xa8], 0
je 0x40544a
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x40544a
push eax
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
jmp 0x40544a
mov edi, dword [esp + 0x104]
jmp 0x4052d1
mov edi, eax
lea ecx, [esp + 0x50]
call fcn.00401f70
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x40530d
cmp eax, 2
je 0x405319
cmp dword [esp + 0xa8], 0
je 0x40530d
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x40530d
push eax
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
lea ecx, [esp + 0xb0]
call fcn.00402030
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x170], 3
test ebx, ebx
je 0x40536a
lea esi, [eax + 8]
shl ebx, 4
jmp 0x405348
add esi, 0x10
add ebx, 0xfffffff0
je 0x40536a
cmp dword [esi - 8], 0
je 0x405340
cmp dword [esi], 0
je 0x405340
mov eax, dword [esi - 4]
test eax, eax
je 0x405340
push eax
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
jmp 0x405340
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40538f
mov ecx, 0x10
mul ecx
mov ecx, dword [esp + 0x1c]
test eax, eax
je 0x40538f
push ecx
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
lea ecx, [esp + 0x168]
call fcn.00401f70
mov eax, dword [esp + 0x1b8]
mov esi, dword [esp + 8]
test eax, eax
je 0x4053dc
cmp eax, 2
je 0x4053e8
cmp dword [esp + 0x1c0], 0
je 0x4053dc
mov eax, dword [esp + 0x1bc]
test eax, eax
je 0x4053dc
push eax
push 0
push dword [0x44210c]
call sub.KERNEL32.dll_HeapFree
jmp 0x4053dc
mov ebx, edx
jmp 0x40544a
mov esi, dword [esp + 8]
lea ecx, [esp + 0x1c8]
call fcn.00402030
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
test edi, edi
je 0x405460
dec edx
mov dword [esp + 0x50], edi
cmp edx, esi
jae 0x405481
mov ecx, dword [eax + 0x80]
mov eax, dword [esp + 0x18]
shl edx, 5
mov esi, edx
mov edx, dword [eax + edx + 0xc]
cmp edx, ecx
jbe 0x405485
mov esi, dword [eax + esi + 4]
lea ecx, [ecx + ecx*2]
xor eax, eax
cmp dword [esi + ecx*8 + 8], 1
mov edx, dword [esi + ecx*8 + 0xc]
lea ebx, [esi + ecx*8]
lea ecx, [esp + 0x50]
sete al
push dword [ebx + eax*4 + 0x10]
call fcn.00434be0
add esp, 4
jmp 0x405462
mov esi, dword [esp + 8]
mov ebx, dword [esp + 0x10]
lea ecx, [esp + 0xb0]
call fcn.00402030
mov eax, dword [esp + 0x28]
mov edx, ebx
test edi, edi
jne 0x4053f4
xor edi, edi
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [esp + 8]
mov ecx, ebx
push 0x4386c8
call fcn.00436220
add esp, 4
ud2
mov ecx, edx
mov edx, esi
push 0x4386d8
call fcn.00436220
add esp, 4
ud2
mov ecx, ebx
push 0x438768
call fcn.00436220
add esp, 4
ud2
mov ecx, edi
push 0x438738
call fcn.00436220
add esp, 4
ud2
mov edx, dword [esp + 4]
mov ecx, edi
push 0x438758
call fcn.00436220
add esp, 4
ud2
call fcn.0040f7b0
ud2
mov ecx, dword [esp + 4]
mov edx, 1
call fcn.00436130
ud2
mov ecx, str.Unable_to_read_table_values
mov edx, 0x1b
push 0x438748
call fcn.004364c0
add esp, 4
ud2
mov ecx, ebx
mov edx, 4
call fcn.00436130
ud2