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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x508e06
sub esp, 0x68
mov eax, dword [esp + 0x88]
test eax, eax
je 0x5086bd
lea eax, [0x5f7d40]
mov dword [esp], eax
call fcn.0040bdb0
mov edi, dword [esp + 4]
mov eax, dword [0x7e34c0]
test eax, eax
jne 0x50848c
mov ebx, dword [esp + 0x6c]
mov dword [edi], ebx
jmp 0x508497
mov eax, dword [esp + 0x6c]
call fcn.00463860
mov ebx, eax
mov dword [esp + 0x5c], edi
mov ebp, dword [esp + 0x80]
test ebp, ebp
jne 0x5084dd
mov esi, dword [esp + 0x78]
test esi, esi
jne 0x5084b4
xor ecx, ecx
xor eax, eax
jmp 0x508507
mov eax, dword [esi + 0x14]
mov ecx, dword [esp + 0x7c]
mov dword [esp], ecx
call eax
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov ebx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x80]
mov esi, dword [esp + 0x78]
mov edi, dword [esp + 0x5c]
jmp 0x508507
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x84]
mov dword [esp], ecx
call eax
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov ebx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x80]
mov esi, dword [esp + 0x78]
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x54], eax
mov edx, ebp
mov ebp, dword [ebx + 0x140]
mov esi, dword [ebx + 0x144]
cmp esi, 4
jne 0x508530
cmp dword [ebp], 0x78696e75
je 0x508588
jmp 0x5085b0
cmp esi, 8
jne 0x508549
cmp dword [ebp], 0x78696e75
jne 0x5085b0
cmp dword [ebp + 4], 0x6d617267
je 0x508588
jmp 0x5085b0
cmp esi, 0xa
jne 0x5085b0
mov dword [esp], ebp
lea eax, [0x61d6d6]
mov dword [esp + 4], eax
mov dword [esp + 8], 0xa
call fcn.00402a50
movzx eax, byte [esp + 0xc]
test al, al
je 0x508599
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x80]
mov ebx, dword [esp + 0x6c]
mov edi, dword [esp + 0x5c]
mov ebp, dword [ebx + 0x140]
mov esi, dword [ebx + 0x144]
jmp 0x508669
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x80]
mov ebx, dword [esp + 0x6c]
mov edi, dword [esp + 0x5c]
mov ebp, dword [ebx + 0x144]
mov esi, dword [ebx + 0x140]
lea edi, [ebp - 1]
cmp ebp, edi
jbe 0x508dfc
movzx edi, byte [ebp + esi - 1]
xchg edi, eax
cmp al, 0x34
xchg edi, eax
je 0x5085da
xchg edi, eax
cmp al, 0x36
xchg edi, eax
jne 0x5085ea
mov edi, dword [esp + 0x5c]
mov edi, esi
mov esi, ebp
mov ebp, edi
mov edi, dword [esp + 0x5c]
jmp 0x508669
cmp dword [ebx + 0x134], 2
jne 0x50862f
mov dword [esp], 0
mov dword [esp + 4], esi
mov dword [esp + 8], ebp
lea eax, [0x6732c8]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
call fcn.0044dd40
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x5c]
jmp 0x508669
mov dword [esp], 0
mov dword [esp + 4], esi
mov dword [esp + 8], ebp
lea eax, [0x6732cc]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
call fcn.0044dd40
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x5c]
mov edx, dword [esp + 0x88]
mov ebx, dword [edx]
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x70]
mov dword [esp], ebx
mov ebx, dword [esp + 0x74]
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
lea eax, [0x675298]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
mov eax, dword [esp + 0x38]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
test eax, eax
jne 0x508dea
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x5086cb
xor ebp, ebp
xor esi, esi
jmp 0x508744
mov eax, dword [eax + 0x20]
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx + 0x134]
mov ebx, dword [esp + 0x7c]
mov dword [esp], ebx
mov dword [esp + 4], edx
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 8]
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x508dd8
test ebp, ebp
je 0x508744
mov dword [esp + 0x40], esi
mov dword [esp + 0x2c], ebp
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx + 0x10]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], esi
call fcn.004712c0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
test eax, eax
jne 0x508d6d
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x80]
test eax, eax
je 0x50880d
mov dword [esp + 0x40], esi
mov dword [esp + 0x2c], ebp
mov eax, dword [eax + 0x20]
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx + 0x134]
mov ebx, dword [esp + 0x84]
mov dword [esp], ebx
mov dword [esp + 4], edx
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
test edx, edx
jne 0x5087fb
mov edx, dword [esp + 0x6c]
mov dword [esp], edx
mov ebx, dword [esp + 0x70]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x74]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
call fcn.004f9b50
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
test eax, eax
jne 0x5087e9
mov eax, dword [esp + 0x6c]
mov byte [eax + 0x13c], 1
jmp 0x508835
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
add esp, 0x68
ret
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebp
add esp, 0x68
ret
mov eax, dword [esp + 0x6c]
mov dword [esp], eax
call fcn.004f9a40
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
test eax, eax
jne 0x508d5b
mov eax, dword [esp + 0x6c]
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0x34], ebx
mov dword [esp + 0x58], ebp
mov ecx, dword [eax + 0x10]
mov dword [esp], ecx
call fcn.004713a0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x34]
test edx, edx
je 0x508a0e
mov ebx, dword [esp + 0x6c]
mov ebp, dword [ebx + 0x134]
cmp ebp, 1
jne 0x508898
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x50887e
lea ebp, [0x63450c]
jmp 0x5088d5
cmp ebp, 2
jne 0x50888b
lea ebp, [0x634504]
jmp 0x5088d5
cmp ebp, 5
jne 0x5088cf
lea ebp, [0x634508]
jmp 0x5088d5
cmp ebp, 2
je 0x5088a2
cmp ebp, 0x17
jne 0x5088cf
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x5088b5
lea ebp, [0x6344fc]
jmp 0x5088d5
cmp ebp, 2
jne 0x5088c2
lea ebp, [0x634500]
jmp 0x5088d5
cmp ebp, 3
jne 0x5088cf
lea ebp, [0x6344f8]
jmp 0x5088d5
lea ebp, [0x6344a4]
mov ebx, dword [ebp]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov edx, ebp
call ebx
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + 0x134]
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x4c], ebx
mov ebp, dword [esp + 8]
mov dword [esp + 0x64], ebp
cmp ecx, 1
jne 0x50892f
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x508915
lea ecx, [0x63450c]
jmp 0x50896c
cmp ecx, 2
jne 0x508922
lea ecx, [0x634504]
jmp 0x50896c
cmp ecx, 5
jne 0x508966
lea ecx, [0x634508]
jmp 0x50896c
cmp ecx, 2
je 0x508939
cmp ecx, 0x17
jne 0x508966
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x50894c
lea ecx, [0x6344fc]
jmp 0x50896c
cmp ecx, 2
jne 0x508959
lea ecx, [0x634500]
jmp 0x50896c
cmp ecx, 3
jne 0x508966
lea ecx, [0x6344f8]
jmp 0x50896c
lea ecx, [0x6344a8]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x34]
mov dword [esp], ebx
mov ebx, dword [esp + 0x58]
mov dword [esp + 4], ebx
mov edx, ecx
call eax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x6c]
mov dword [ebp + 0x148], ebx
mov ebx, dword [0x7e34c0]
test ebx, ebx
jne 0x5089ad
mov edx, dword [esp + 0x4c]
mov dword [ebp + 0x14c], edx
jmp 0x5089c0
lea edi, [ebp + 0x14c]
mov edx, eax
mov eax, dword [esp + 0x4c]
call fcn.00463860
mov eax, edx
mov dword [ebp + 0x150], ecx
mov ecx, dword [0x7e34c0]
test ecx, ecx
jne 0x5089d8
mov dword [ebp + 0x154], eax
jmp 0x5089e3
lea edi, [ebp + 0x154]
call fcn.00463860
lea eax, [0x615bc0]
mov dword [esp], eax
mov dword [esp + 4], ebp
lea eax, [0x5edf00]
mov dword [esp + 8], eax
lea eax, [0x6344a0]
mov dword [esp + 0xc], eax
call fcn.00414cb0
jmp 0x508d41
mov dword [esp + 0x64], eax
mov dword [esp + 0x40], ecx
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + 0x10]
mov dword [esp], ecx
call fcn.00471480
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
test edx, edx
je 0x508bf8
mov dword [esp + 0x60], eax
mov dword [esp + 0x3c], ecx
mov ebx, dword [esp + 0x6c]
mov ebp, dword [ebx + 0x134]
cmp ebp, 1
jne 0x508a7d
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x508a63
lea edx, [0x63450c]
jmp 0x508aba
cmp ebp, 2
jne 0x508a70
lea edx, [0x634504]
jmp 0x508aba
cmp ebp, 5
jne 0x508ab4
lea edx, [0x634508]
jmp 0x508aba
cmp ebp, 2
je 0x508a87
cmp ebp, 0x17
jne 0x508ab4
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x508a9a
lea edx, [0x6344fc]
jmp 0x508aba
cmp ebp, 2
jne 0x508aa7
lea edx, [0x634500]
jmp 0x508aba
cmp ebp, 3
jne 0x508ab4
lea edx, [0x6344f8]
jmp 0x508aba
lea edx, [0x6344ac]
mov eax, dword [edx]
mov ecx, dword [esp + 0x64]
mov dword [esp], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + 0x134]
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x48], ebx
mov ebp, dword [esp + 8]
mov dword [esp + 0x64], ebp
cmp ecx, 1
jne 0x508b19
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x508aff
lea ecx, [0x63450c]
jmp 0x508b56
cmp ecx, 2
jne 0x508b0c
lea ecx, [0x634504]
jmp 0x508b56
cmp ecx, 5
jne 0x508b50
lea ecx, [0x634508]
jmp 0x508b56
cmp ecx, 2
je 0x508b23
cmp ecx, 0x17
jne 0x508b50
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x508b36
lea ecx, [0x6344fc]
jmp 0x508b56
cmp ecx, 2
jne 0x508b43
lea ecx, [0x634500]
jmp 0x508b56
cmp ecx, 3
jne 0x508b50
lea ecx, [0x6344f8]
jmp 0x508b56
lea ecx, [0x6344b0]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x60]
mov dword [esp], ebx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 4], ebx
mov edx, ecx
call eax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x6c]
mov dword [ebp + 0x148], ebx
mov ebx, dword [0x7e34c0]
test ebx, ebx
jne 0x508b97
mov edx, dword [esp + 0x48]
mov dword [ebp + 0x14c], edx
jmp 0x508baa
lea edi, [ebp + 0x14c]
mov edx, eax
mov eax, dword [esp + 0x48]
call fcn.00463860
mov eax, edx
mov dword [ebp + 0x150], ecx
mov ecx, dword [0x7e34c0]
test ecx, ecx
jne 0x508bc2
mov dword [ebp + 0x154], eax
jmp 0x508bcd
lea edi, [ebp + 0x154]
call fcn.00463860
lea eax, [0x615bc0]
mov dword [esp], eax
mov dword [esp + 4], ebp
lea eax, [0x5edf00]
mov dword [esp + 8], eax
lea eax, [0x6344a0]
mov dword [esp + 0xc], eax
call fcn.00414cb0
jmp 0x508d41
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + 0x134]
cmp ecx, 1
jne 0x508c34
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x508c1a
lea ecx, [0x63450c]
jmp 0x508c71
cmp ecx, 2
jne 0x508c27
lea ecx, [0x634504]
jmp 0x508c71
cmp ecx, 5
jne 0x508c6b
lea ecx, [0x634508]
jmp 0x508c71
cmp ecx, 2
je 0x508c3e
cmp ecx, 0x17
jne 0x508c6b
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x508c51
lea ecx, [0x6344fc]
jmp 0x508c71
cmp ecx, 2
jne 0x508c5e
lea ecx, [0x634500]
jmp 0x508c71
cmp ecx, 3
jne 0x508c6b
lea ecx, [0x6344f8]
jmp 0x508c71
lea ecx, [0x6344b4]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x64]
mov dword [esp], ebx
mov ebx, dword [esp + 0x40]
mov dword [esp + 4], ebx
mov edx, ecx
call eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 8]
mov dword [esp + 0x64], ecx
lea ebx, [0x5f89c0]
mov dword [esp], ebx
mov ebx, dword [esp + 0x80]
mov dword [esp + 4], ebx
call fcn.004097f0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x64]
mov ebx, dword [esp + 0x6c]
mov dword [ebx + 0x148], ecx
mov ecx, dword [0x7e34c0]
test ecx, ecx
jne 0x508cd7
mov ecx, dword [esp + 0x44]
mov dword [ebx + 0x14c], ecx
jmp 0x508cea
lea edi, [ebx + 0x14c]
mov ecx, eax
mov eax, dword [esp + 0x44]
call fcn.00463860
mov eax, ecx
mov dword [ebx + 0x150], eax
mov ecx, dword [0x7e34c0]
test ecx, ecx
jne 0x508d09
mov eax, dword [esp + 0x84]
mov dword [ebx + 0x154], eax
jmp 0x508d1b
lea edi, [ebx + 0x154]
mov eax, dword [esp + 0x84]
call fcn.00463860
lea eax, [0x615bc0]
mov dword [esp], eax
mov dword [esp + 4], ebx
lea eax, [0x5edf00]
mov dword [esp + 8], eax
lea eax, [0x6344a0]
mov dword [esp + 0xc], eax
call fcn.00414cb0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
add esp, 0x68
ret
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
add esp, 0x68
ret
mov dword [esp + 0x50], ecx
mov dword [esp + 0x64], edx
lea eax, [0x5fc020]
mov dword [esp], eax
call fcn.0040bdb0
mov eax, dword [esp + 4]
mov dword [eax + 4], 4
lea ecx, [0x61be63]
mov dword [eax], ecx
mov ecx, dword [esp + 0x64]
mov dword [eax + 8], ecx
mov ecx, dword [0x7e34c0]
test ecx, ecx
jne 0x508db0
mov ecx, dword [esp + 0x50]
mov dword [eax + 0xc], ecx
jmp 0x508dc0
lea edi, [eax + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x50]
call fcn.00463860
mov eax, ecx
lea ecx, [0x674be4]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], eax
add esp, 0x68
ret
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], ebx
add esp, 0x68
ret
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], ebx
add esp, 0x68
ret
mov eax, edi
mov ecx, ebp
call fcn.004638e0
nop
call fcn.00462450
jmp fcn.00508440