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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x504eb2
sub esp, 0x64
mov eax, dword [esp + 0x84]
test eax, eax
je 0x50476f
lea eax, [0x5769a0]
mov dword [esp], eax
call fcn.0040a390
mov edi, dword [esp + 4]
mov eax, dword [0x7e73a0]
test eax, eax
jne 0x50456c
mov ebx, dword [esp + 0x68]
mov dword [edi], ebx
jmp 0x504577
mov eax, dword [esp + 0x68]
call fcn.004518b0
mov ebx, eax
mov dword [esp + 0x38], edi
mov ebp, dword [esp + 0x7c]
test ebp, ebp
jne 0x5045b7
mov esi, dword [esp + 0x74]
test esi, esi
jne 0x504591
xor ecx, ecx
xor eax, eax
jmp 0x5045de
mov eax, dword [esi + 0x14]
mov ecx, dword [esp + 0x78]
mov dword [esp], ecx
call eax
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x7c]
mov esi, dword [esp + 0x74]
mov edi, dword [esp + 0x38]
jmp 0x5045de
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x80]
mov dword [esp], ecx
call eax
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x7c]
mov esi, dword [esp + 0x74]
mov edi, dword [esp + 0x38]
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 0x504604
cmp dword [ebp], 0x78696e75
je 0x504655
jmp 0x50467a
cmp esi, 8
jne 0x50461d
cmp dword [ebp], 0x78696e75
jne 0x50467a
cmp dword [ebp + 4], 0x6d617267
je 0x504655
jmp 0x50467a
cmp esi, 0xa
jne 0x50467a
mov dword [esp], ebp
lea eax, [0x58d674]
mov dword [esp + 4], eax
mov dword [esp + 8], esi
call fcn.004028d0
movzx eax, byte [esp + 0xc]
test al, al
je 0x504666
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x7c]
mov ebx, dword [esp + 0x68]
mov edi, dword [esp + 0x38]
mov ebp, dword [ebx + 0x140]
mov esi, dword [ebx + 0x144]
jmp 0x504733
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x7c]
mov ebx, dword [esp + 0x68]
mov edi, dword [esp + 0x38]
mov ebp, dword [ebx + 0x144]
mov esi, dword [ebx + 0x140]
lea edi, [ebp - 1]
cmp ebp, edi
jbe 0x504ea8
movzx edi, byte [ebp + esi - 1]
xchg edi, eax
cmp al, 0x34
xchg edi, eax
je 0x5046a4
xchg edi, eax
cmp al, 0x36
xchg edi, eax
jne 0x5046b4
mov edi, dword [esp + 0x38]
mov edi, esi
mov esi, ebp
mov ebp, edi
mov edi, dword [esp + 0x38]
jmp 0x504733
cmp dword [ebx + 0x134], 2
jne 0x5046f9
mov dword [esp], 0
mov dword [esp + 4], esi
mov dword [esp + 8], ebp
lea eax, str.4_BHLNXZ_abdx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
call fcn.00441aa0
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x38]
jmp 0x504733
mov dword [esp], 0
mov dword [esp + 4], esi
mov dword [esp + 8], ebp
lea eax, [0x71e98c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
call fcn.00441aa0
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x38]
mov edx, dword [esp + 0x84]
mov ebx, dword [edx]
mov dword [esp], ebp
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
lea eax, [0x71f3f4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
call ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test eax, eax
jne 0x504e96
mov eax, dword [esp + 0x74]
test eax, eax
jne 0x50477d
xor ebp, ebp
xor esi, esi
jmp 0x5047f6
mov eax, dword [eax + 0x20]
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx + 0x134]
mov ebx, dword [esp + 0x78]
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 0x504e84
test ebp, ebp
je 0x5047f6
mov dword [esp + 0x40], esi
mov dword [esp + 0x2c], ebp
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx + 0x10]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], esi
call fcn.00473be0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
test eax, eax
jne 0x504e19
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x5048bc
mov dword [esp + 0x40], esi
mov dword [esp + 0x2c], ebp
mov eax, dword [eax + 0x20]
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx + 0x134]
mov ebx, dword [esp + 0x80]
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 0x5048aa
mov edx, dword [esp + 0x68]
mov dword [esp], edx
mov ebx, dword [esp + 0x6c]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x70]
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.004f91e0
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 0x504898
mov eax, dword [esp + 0x68]
mov byte [eax + 0x13c], 1
jmp 0x5048e4
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], edx
add esp, 0x64
ret
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebp
add esp, 0x64
ret
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call fcn.004f90d0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
test eax, eax
jne 0x504e07
mov eax, dword [esp + 0x68]
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.00473cc0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x34]
test edx, edx
je 0x504abd
mov ebx, dword [esp + 0x68]
mov ebp, dword [ebx + 0x134]
cmp ebp, 1
jne 0x504947
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x50492d
lea ebp, [0x6f670c]
jmp 0x504984
cmp ebp, 2
jne 0x50493a
lea ebp, [0x6f6704]
jmp 0x504984
cmp ebp, 5
jne 0x50497e
lea ebp, [0x6f6708]
jmp 0x504984
cmp ebp, 2
je 0x504951
cmp ebp, 0x17
jne 0x50497e
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x504964
lea ebp, [0x6f66fc]
jmp 0x504984
cmp ebp, 2
jne 0x504971
lea ebp, [0x6f6700]
jmp 0x504984
cmp ebp, 3
jne 0x50497e
lea ebp, [0x6f66f8]
jmp 0x504984
lea ebp, [0x6f66bc]
mov ebx, dword [ebp]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov edx, ebp
call ebx
mov eax, dword [esp + 0x68]
mov ecx, dword [eax + 0x134]
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x4c], ebx
mov ebp, dword [esp + 8]
mov dword [esp + 0x60], ebp
cmp ecx, 1
jne 0x5049de
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x5049c4
lea ecx, [0x6f670c]
jmp 0x504a1b
cmp ecx, 2
jne 0x5049d1
lea ecx, [0x6f6704]
jmp 0x504a1b
cmp ecx, 5
jne 0x504a15
lea ecx, [0x6f6708]
jmp 0x504a1b
cmp ecx, 2
je 0x5049e8
cmp ecx, 0x17
jne 0x504a15
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x5049fb
lea ecx, [0x6f66fc]
jmp 0x504a1b
cmp ecx, 2
jne 0x504a08
lea ecx, [0x6f6700]
jmp 0x504a1b
cmp ecx, 3
jne 0x504a15
lea ecx, [0x6f66f8]
jmp 0x504a1b
lea ecx, [0x6f66c0]
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 + 0x60]
mov ebp, dword [esp + 0x68]
mov dword [ebp + 0x148], ebx
mov ebx, dword [0x7e73a0]
test ebx, ebx
jne 0x504a5c
mov edx, dword [esp + 0x4c]
mov dword [ebp + 0x14c], edx
jmp 0x504a6f
lea edi, [ebp + 0x14c]
mov edx, eax
mov eax, dword [esp + 0x4c]
call fcn.004518b0
mov eax, edx
mov dword [ebp + 0x150], ecx
mov ecx, dword [0x7e73a0]
test ecx, ecx
jne 0x504a87
mov dword [ebp + 0x154], eax
jmp 0x504a92
lea edi, [ebp + 0x154]
call fcn.004518b0
lea eax, [0x589260]
mov dword [esp], eax
mov dword [esp + 4], ebp
lea eax, [0x570fa0]
mov dword [esp + 8], eax
lea eax, [0x6f66b8]
mov dword [esp + 0xc], eax
call fcn.00413010
jmp 0x504ded
mov dword [esp + 0x40], ecx
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x68]
mov ecx, dword [eax + 0x10]
mov dword [esp], ecx
call fcn.00473da0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
test edx, edx
je 0x504ca7
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x5c], eax
mov ebx, dword [esp + 0x68]
mov ebp, dword [ebx + 0x134]
cmp ebp, 1
jne 0x504b2c
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x504b12
lea edx, [0x6f670c]
jmp 0x504b69
cmp ebp, 2
jne 0x504b1f
lea edx, [0x6f6704]
jmp 0x504b69
cmp ebp, 5
jne 0x504b63
lea edx, [0x6f6708]
jmp 0x504b69
cmp ebp, 2
je 0x504b36
cmp ebp, 0x17
jne 0x504b63
mov ebp, dword [ebx + 0x138]
cmp ebp, 1
jne 0x504b49
lea edx, [0x6f66fc]
jmp 0x504b69
cmp ebp, 2
jne 0x504b56
lea edx, [0x6f6700]
jmp 0x504b69
cmp ebp, 3
jne 0x504b63
lea edx, [0x6f66f8]
jmp 0x504b69
lea edx, [0x6f66c4]
mov eax, dword [edx]
mov ecx, dword [esp + 0x60]
mov dword [esp], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 0x68]
mov ecx, dword [eax + 0x134]
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x48], ebx
mov ebp, dword [esp + 8]
mov dword [esp + 0x60], ebp
cmp ecx, 1
jne 0x504bc8
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x504bae
lea ecx, [0x6f670c]
jmp 0x504c05
cmp ecx, 2
jne 0x504bbb
lea ecx, [0x6f6704]
jmp 0x504c05
cmp ecx, 5
jne 0x504bff
lea ecx, [0x6f6708]
jmp 0x504c05
cmp ecx, 2
je 0x504bd2
cmp ecx, 0x17
jne 0x504bff
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x504be5
lea ecx, [0x6f66fc]
jmp 0x504c05
cmp ecx, 2
jne 0x504bf2
lea ecx, [0x6f6700]
jmp 0x504c05
cmp ecx, 3
jne 0x504bff
lea ecx, [0x6f66f8]
jmp 0x504c05
lea ecx, [0x6f66c8]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x5c]
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 + 0x60]
mov ebp, dword [esp + 0x68]
mov dword [ebp + 0x148], ebx
mov ebx, dword [0x7e73a0]
test ebx, ebx
jne 0x504c46
mov edx, dword [esp + 0x48]
mov dword [ebp + 0x14c], edx
jmp 0x504c59
lea edi, [ebp + 0x14c]
mov edx, eax
mov eax, dword [esp + 0x48]
call fcn.004518b0
mov eax, edx
mov dword [ebp + 0x150], ecx
mov ecx, dword [0x7e73a0]
test ecx, ecx
jne 0x504c71
mov dword [ebp + 0x154], eax
jmp 0x504c7c
lea edi, [ebp + 0x154]
call fcn.004518b0
lea eax, [0x589260]
mov dword [esp], eax
mov dword [esp + 4], ebp
lea eax, [0x570fa0]
mov dword [esp + 8], eax
lea eax, [0x6f66b8]
mov dword [esp + 0xc], eax
call fcn.00413010
jmp 0x504ded
mov eax, dword [esp + 0x68]
mov ecx, dword [eax + 0x134]
cmp ecx, 1
jne 0x504ce3
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x504cc9
lea ecx, [0x6f670c]
jmp 0x504d20
cmp ecx, 2
jne 0x504cd6
lea ecx, [0x6f6704]
jmp 0x504d20
cmp ecx, 5
jne 0x504d1a
lea ecx, [0x6f6708]
jmp 0x504d20
cmp ecx, 2
je 0x504ced
cmp ecx, 0x17
jne 0x504d1a
mov ecx, dword [eax + 0x138]
cmp ecx, 1
jne 0x504d00
lea ecx, [0x6f66fc]
jmp 0x504d20
cmp ecx, 2
jne 0x504d0d
lea ecx, [0x6f6700]
jmp 0x504d20
cmp ecx, 3
jne 0x504d1a
lea ecx, [0x6f66f8]
jmp 0x504d20
lea ecx, [0x6f66cc]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x60]
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 + 0x60], ecx
lea ebx, [0x577020]
mov dword [esp], ebx
mov ebx, dword [esp + 0x7c]
mov dword [esp + 4], ebx
call fcn.00408230
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x68]
mov dword [ebx + 0x148], ecx
mov ecx, dword [0x7e73a0]
test ecx, ecx
jne 0x504d83
mov ecx, dword [esp + 0x44]
mov dword [ebx + 0x14c], ecx
jmp 0x504d96
lea edi, [ebx + 0x14c]
mov ecx, eax
mov eax, dword [esp + 0x44]
call fcn.004518b0
mov eax, ecx
mov dword [ebx + 0x150], eax
mov ecx, dword [0x7e73a0]
test ecx, ecx
jne 0x504db5
mov eax, dword [esp + 0x80]
mov dword [ebx + 0x154], eax
jmp 0x504dc7
lea edi, [ebx + 0x154]
mov eax, dword [esp + 0x80]
call fcn.004518b0
lea eax, [0x589260]
mov dword [esp], eax
mov dword [esp + 4], ebx
lea eax, [0x570fa0]
mov dword [esp + 8], eax
lea eax, [0x6f66b8]
mov dword [esp + 0xc], eax
call fcn.00413010
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
add esp, 0x64
ret
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], edx
add esp, 0x64
ret
mov dword [esp + 0x50], ecx
mov dword [esp + 0x60], edx
lea eax, [0x579000]
mov dword [esp], eax
call fcn.0040a390
mov eax, dword [esp + 4]
mov dword [eax + 4], 4
lea ecx, [0x58c83b]
mov dword [eax], ecx
mov ecx, dword [esp + 0x60]
mov dword [eax + 8], ecx
mov ecx, dword [0x7e73a0]
test ecx, ecx
jne 0x504e5c
mov ecx, dword [esp + 0x50]
mov dword [eax + 0xc], ecx
jmp 0x504e6c
lea edi, [eax + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x50]
call fcn.004518b0
mov eax, ecx
lea ecx, [0x71efcc]
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], eax
add esp, 0x64
ret
mov dword [esp + 0x88], edx
mov dword [esp + 0x8c], ebx
add esp, 0x64
ret
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], ebx
add esp, 0x64
ret
mov eax, edi
mov ecx, ebp
call fcn.00451930
nop
call fcn.00450480
jmp fcn.00504520