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

Disassembly:
sub esp, 0xc8
mov eax, dword [esp + 0xcc]
push ebx
push ebp
push esi
xor esi, esi
push edi
xor ebp, ebp
mov dword [esp + 0x38], esi
call fcn.004f4f80
mov edi, dword [0x15336f8]
xor ecx, ecx
cmp edi, esi
jle 0x5045ce
mov edx, dword [esp + 0xdc]
mov ebx, dword [edx]
add edx, 0x90
lea esp, [esp]
mov eax, 0x100
shl eax, cl
test ebx, eax
je 0x5045c3
mov eax, dword [edx]
mov dword [esp + ecx*4 + 0x6c], esi
mov dword [esp + ecx*4 + 0x4c], eax
lea esi, [esi + eax*4]
mov eax, dword [ecx*4 + 0x16e7be0]
mov dword [esp + ecx*4 + 0x10], eax
inc ecx
add edx, 0xc8
cmp ecx, edi
jl 0x5045a0
mov ecx, dword [esp + 0xdc]
test dword [ecx], 0x10000
je 0x5045ed
mov edx, ecx
mov ebp, esi
push edx
add esi, 4
call fcn.004f45e0
add esp, 4
mov eax, dword [esp + 0xdc]
test dword [eax], 0x20000
je 0x504603
mov dword [esp + 0x38], esi
add esi, 0xc
mov ecx, dword [0x17efc00]
mov edi, dword [0x17efc28]
mov eax, dword [0x154906c]
lea ebx, [esi + ecx*4]
imul edi, ebx
test eax, eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x48], ebx
mov esi, 0x162fbe0
mov dword [esp + 0x30], 0
mov dword [esp + 0x98], edi
je 0x50465e
push eax
push 0x8892
call dword [0x1533d84]
mov eax, dword [0x1549074]
mov ecx, dword [0x1549070]
lea edx, [eax + edi]
cmp edx, ecx
jg 0x504675
mov dword [esp + 0x30], eax
jmp 0x504675
mov eax, dword [0x1549078]
inc eax
push eax
push 0x8892
mov dword [0x1549078], eax
call dword [0x1533d84]
mov ecx, dword [0x15336f8]
xor eax, eax
test ecx, ecx
jle 0x504695
mov edx, dword [esp + eax*4 + 0x6c]
add edx, dword [esp + 0x30]
inc eax
cmp eax, ecx
mov dword [esp + eax*4 + 0xb4], edx
jl 0x504681
mov ecx, dword [esp + 0xdc]
push ebx
lea eax, [esp + 0xbc]
push eax
push ecx
call fcn.004f33c0
mov edx, dword [esp + 0xe8]
mov eax, dword [edx]
add esp, 0xc
test eax, 0x10000
mov eax, dword [0x15335d4]
je 0x5046f4
test ah, 1
jne 0x5046dd
push 0x8076
call dword [0x15338d8]
or dword [0x15335d4], 0x100
mov eax, dword [esp + 0x30]
add eax, ebp
push eax
push ebx
push 0x1401
push 4
call dword [0x15343cc]
jmp 0x50473d
test ah, 1
je 0x50470e
push 0x8076
call dword [0x15338fc]
and dword [0x15335d4], 0xfffffeff
mov ecx, dword [esp + 0xdc]
cmp dword [ecx + 0x664], 0xb
jne 0x50472a
mov edx, dword [0x1548adc]
add edx, 0x6c
push edx
jmp 0x504737
mov eax, dword [esp + 0xdc]
add eax, 0x680
push eax
call dword [0x1533e50]
mov ecx, dword [esp + 0xdc]
test dword [ecx], 0x20000
mov eax, dword [0x15335d4]
je 0x504784
test ah, 2
jne 0x50476b
push 0x8075
call dword [0x15338d8]
or dword [0x15335d4], 0x200
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
add eax, edx
push eax
push ebx
push 0x1406
call dword [0x1533fdc]
jmp 0x50479e
test ah, 2
je 0x50479e
push 0x8075
call dword [0x15338fc]
and dword [0x15335d4], 0xfffffdff
mov eax, dword [0x15335d4]
test ah, 4
jne 0x5047bd
push 0x8074
call dword [0x15338d8]
or dword [0x15335d4], 0x400
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
mov eax, dword [0x17efc00]
add ecx, edx
push ecx
push ebx
push 0x1406
push eax
call dword [0x1534490]
mov eax, dword [0x154906c]
test eax, eax
jne 0x50480f
push 0x88e0
xor ebx, ebx
push ebx
push edi
push 0x8892
mov dword [esp + 0x54], ebx
call dword [0x153427c]
push 0x88b9
push 0x8892
call dword [0x15345a4]
test eax, eax
jne 0x50481f
push edi
call dword [0x15485b0]
mov ebx, eax
add esp, 4
mov dword [esp + 0x44], ebx
mov ecx, dword [esp + 0xdc]
mov ecx, dword [ecx]
mov edi, dword [esp + 0x4c]
mov edx, dword [0x17efc00]
and ecx, 0x3ff00
cmp ecx, 0x20100
jne 0x5048d3
cmp edi, 2
jne 0x5048d3
cmp edx, 3
jne 0x5048d3
mov ecx, dword [0x17efc28]
xor edi, edi
test ecx, ecx
jle 0x504f02
mov edx, dword [esp + 0x10]
mov ecx, 0x1697be4
nop
mov ebp, dword [edx]
mov dword [eax], ebp
mov ebp, dword [edx + 4]
mov dword [eax + 4], ebp
mov ebp, dword [ecx - 4]
add eax, 4
mov dword [eax + 4], ebp
mov ebp, dword [ecx]
add edx, 4
add eax, 4
mov dword [eax + 4], ebp
mov ebp, dword [ecx + 4]
add eax, 4
mov dword [eax + 4], ebp
mov ebp, dword [esi]
add eax, 4
add eax, 4
mov dword [eax], ebp
mov ebp, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], ebp
mov ebp, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], ebp
mov ebp, dword [0x17efc28]
add edx, 4
add eax, 4
add esi, 4
inc edi
add ecx, 0xc
cmp edi, ebp
jl 0x504870
jmp 0x504f02
cmp ecx, 0x10100
jne 0x504953
cmp edi, 2
jne 0x504953
cmp edx, 3
jne 0x504953
mov ecx, dword [0x17efc28]
xor edx, edx
test ecx, ecx
jle 0x504f02
mov ecx, dword [esp + 0x10]
lea esp, [esp]
mov edi, dword [ecx]
mov dword [eax], edi
mov edi, dword [ecx + 4]
mov dword [eax + 4], edi
mov edi, dword [edx*4 + 0x16dfbe0]
add eax, 4
add ecx, 4
mov dword [eax + 4], edi
mov edi, dword [esi]
add eax, 4
add eax, 4
mov dword [eax], edi
mov edi, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], edi
mov edi, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], edi
mov edi, dword [0x17efc28]
add ecx, 4
add eax, 4
add esi, 4
inc edx
cmp edx, edi
jl 0x504900
jmp 0x504f02
cmp ecx, 0x100
jne 0x5049c6
cmp edi, 2
jne 0x5049c6
cmp edx, 3
jne 0x5049c6
mov ecx, dword [0x17efc28]
xor edx, edx
test ecx, ecx
jle 0x504f02
mov ecx, dword [esp + 0x10]
lea esp, [esp]
mov edi, dword [ecx]
mov dword [eax], edi
mov edi, dword [ecx + 4]
mov dword [eax + 4], edi
mov edi, dword [esi]
add eax, 4
add ecx, 4
add eax, 4
mov dword [eax], edi
mov edi, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], edi
mov edi, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], edi
mov edi, dword [0x17efc28]
add ecx, 4
add eax, 4
add esi, 4
inc edx
cmp edx, edi
jl 0x504980
jmp 0x504f02
cmp ecx, 0x10300
jne 0x504a70
cmp edi, 2
jne 0x504a70
cmp dword [esp + 0x50], edi
jne 0x504a70
cmp edx, 3
jne 0x504a70
mov ecx, dword [0x17efc28]
xor edi, edi
test ecx, ecx
jle 0x504f02
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov ebp, dword [ecx]
mov dword [eax], ebp
mov ebp, dword [ecx + 4]
mov dword [eax + 4], ebp
mov ebp, dword [edx]
add eax, 4
mov dword [eax + 4], ebp
mov ebp, dword [edx + 4]
add ecx, 4
add eax, 4
mov dword [eax + 4], ebp
mov ebp, dword [edi*4 + 0x16dfbe0]
add eax, 4
add edx, 4
mov dword [eax + 4], ebp
mov ebp, dword [esi]
add eax, 4
add eax, 4
mov dword [eax], ebp
mov ebp, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], ebp
mov ebp, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], ebp
mov ebp, dword [0x17efc28]
add ecx, 4
add edx, 4
add eax, 4
add esi, 4
inc edi
cmp edi, ebp
jl 0x504a06
jmp 0x504f02
mov ecx, dword [0x17efc28]
test ecx, ecx
mov dword [esp + 0x3c], 0
jle 0x504f02
mov ecx, dword [esp + 0x70]
mov edi, dword [esp + 0x6c]
sub edi, ecx
mov dword [esp + 0xb0], edi
mov edi, dword [esp + 0x74]
sub edi, ecx
mov dword [esp + 0xa0], edi
mov edi, dword [esp + 0x78]
sub edi, ecx
mov dword [esp + 0xa8], edi
mov edi, dword [esp + 0x7c]
sub edi, ecx
mov dword [esp + 0x8c], edi
mov edi, dword [esp + 0x80]
sub edi, ecx
mov dword [esp + 0x94], edi
mov edi, dword [esp + 0x84]
sub edi, ecx
mov dword [esp + 0xb4], edi
mov edi, dword [esp + 0x88]
sub edi, ecx
mov dword [esp + 0x9c], edi
mov edi, dword [esp + 0x38]
sub edi, ecx
mov dword [esp + 0xa4], edi
mov edi, dword [esp + 0x40]
sub ebp, ecx
sub edi, ecx
mov dword [esp + 0x90], edi
mov edi, dword [esp + 0x2c]
lea edx, [ecx + eax]
mov dword [esp + 0x34], 0x1697be4
mov dword [esp + 0xac], ebp
mov ebx, dword [esp + 0xdc]
test byte [ebx + 1], 1
mov ebp, dword [esp + 0x14]
je 0x504b8e
mov ebx, dword [esp + 0x10]
mov ebx, dword [ebx]
mov ebp, dword [esp + 0xb0]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0x10]
mov ebp, dword [ebx + 4]
add ebx, 4
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x6c]
mov dword [ebx + eax + 4], ebp
add dword [esp + 0x10], 4
cmp dword [esp + 0x4c], 3
jl 0x504b8a
mov ebp, dword [esp + 0x10]
mov ebp, dword [ebp]
mov dword [ebx + eax + 8], ebp
add dword [esp + 0x10], 4
cmp dword [esp + 0x4c], 4
jne 0x504b8a
mov ebp, dword [esp + 0x10]
mov ebp, dword [ebp]
mov dword [ebx + eax + 0xc], ebp
add dword [esp + 0x10], 4
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0xdc]
test byte [ebx + 1], 2
je 0x504bdf
mov ebx, dword [ebp]
add ebp, 4
mov dword [edx], ebx
mov ebx, dword [ebp]
mov dword [ecx + eax + 4], ebx
mov ebx, dword [esp + 0x50]
add ebp, 4
cmp ebx, 3
mov dword [esp + 0x14], ebp
jl 0x504bdf
mov ebx, dword [ebp]
mov dword [ecx + eax + 8], ebx
mov ebx, dword [esp + 0x50]
add ebp, 4
cmp ebx, 4
mov dword [esp + 0x14], ebp
jne 0x504bdf
mov ebx, dword [ebp]
add ebp, 4
mov dword [ecx + eax + 0xc], ebx
mov dword [esp + 0x14], ebp
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x400
je 0x504c47
mov ebx, dword [esp + 0x18]
mov ebx, dword [ebx]
mov ebp, dword [esp + 0xa0]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0x18]
mov ebp, dword [ebx + 4]
add ebx, 4
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x74]
mov dword [ebx + eax + 4], ebp
add dword [esp + 0x18], 4
cmp dword [esp + 0x54], 3
jl 0x504c47
mov ebp, dword [esp + 0x18]
mov ebp, dword [ebp]
mov dword [ebx + eax + 8], ebp
add dword [esp + 0x18], 4
cmp dword [esp + 0x54], 4
jne 0x504c47
mov ebp, dword [esp + 0x18]
mov ebp, dword [ebp]
mov dword [ebx + eax + 0xc], ebp
add dword [esp + 0x18], 4
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x800
je 0x504caf
mov ebx, dword [esp + 0x1c]
mov ebx, dword [ebx]
mov ebp, dword [esp + 0xa8]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0x1c]
mov ebp, dword [ebx + 4]
add ebx, 4
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x78]
mov dword [ebx + eax + 4], ebp
add dword [esp + 0x1c], 4
cmp dword [esp + 0x58], 3
jl 0x504caf
mov ebp, dword [esp + 0x1c]
mov ebp, dword [ebp]
mov dword [ebx + eax + 8], ebp
add dword [esp + 0x1c], 4
cmp dword [esp + 0x58], 4
jne 0x504caf
mov ebp, dword [esp + 0x1c]
mov ebp, dword [ebp]
mov dword [ebx + eax + 0xc], ebp
add dword [esp + 0x1c], 4
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x1000
je 0x504d17
mov ebx, dword [esp + 0x20]
mov ebx, dword [ebx]
mov ebp, dword [esp + 0x8c]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0x20]
mov ebp, dword [ebx + 4]
add ebx, 4
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x7c]
mov dword [ebx + eax + 4], ebp
add dword [esp + 0x20], 4
cmp dword [esp + 0x5c], 3
jl 0x504d17
mov ebp, dword [esp + 0x20]
mov ebp, dword [ebp]
mov dword [ebx + eax + 8], ebp
add dword [esp + 0x20], 4
cmp dword [esp + 0x5c], 4
jne 0x504d17
mov ebp, dword [esp + 0x20]
mov ebp, dword [ebp]
mov dword [ebx + eax + 0xc], ebp
add dword [esp + 0x20], 4
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x2000
je 0x504d82
mov ebx, dword [esp + 0x24]
mov ebx, dword [ebx]
mov ebp, dword [esp + 0x94]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0x24]
mov ebp, dword [ebx + 4]
add ebx, 4
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x80]
mov dword [ebx + eax + 4], ebp
add dword [esp + 0x24], 4
cmp dword [esp + 0x60], 3
jl 0x504d82
mov ebp, dword [esp + 0x24]
mov ebp, dword [ebp]
mov dword [ebx + eax + 8], ebp
add dword [esp + 0x24], 4
cmp dword [esp + 0x60], 4
jne 0x504d82
mov ebp, dword [esp + 0x24]
mov ebp, dword [ebp]
mov dword [ebx + eax + 0xc], ebp
add dword [esp + 0x24], 4
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x4000
je 0x504ded
mov ebx, dword [esp + 0x28]
mov ebx, dword [ebx]
mov ebp, dword [esp + 0xb4]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0x28]
mov ebp, dword [ebx + 4]
add ebx, 4
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x84]
mov dword [ebx + eax + 4], ebp
add dword [esp + 0x28], 4
cmp dword [esp + 0x64], 3
jl 0x504ded
mov ebp, dword [esp + 0x28]
mov ebp, dword [ebp]
mov dword [ebx + eax + 8], ebp
add dword [esp + 0x28], 4
cmp dword [esp + 0x64], 4
jne 0x504ded
mov ebp, dword [esp + 0x28]
mov ebp, dword [ebp]
mov dword [ebx + eax + 0xc], ebp
add dword [esp + 0x28], 4
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x8000
je 0x504e40
mov ebx, dword [edi]
mov ebp, dword [esp + 0x9c]
mov dword [edx + ebp], ebx
mov ebp, dword [edi + 4]
mov ebx, dword [esp + 0x88]
add edi, 4
mov dword [ebx + eax + 4], ebp
mov ebp, dword [esp + 0x68]
add edi, 4
cmp ebp, 3
jl 0x504e40
mov ebp, dword [edi]
mov dword [ebx + eax + 8], ebp
mov ebp, dword [esp + 0x68]
add edi, 4
cmp ebp, 4
jne 0x504e40
mov ebp, dword [edi]
mov dword [ebx + eax + 0xc], ebp
add edi, 4
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x10000
je 0x504e64
mov ebx, dword [esp + 0x3c]
mov ebx, dword [ebx*4 + 0x16dfbe0]
mov ebp, dword [esp + 0xac]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0xdc]
test dword [ebx], 0x20000
je 0x504e9d
mov ebx, dword [esp + 0x34]
mov ebx, dword [ebx - 4]
mov ebp, dword [esp + 0xa4]
mov dword [edx + ebp], ebx
mov ebx, dword [esp + 0x34]
mov ebp, dword [ebx]
mov ebx, dword [esp + 0x38]
mov dword [eax + ebx + 4], ebp
mov ebp, dword [esp + 0x34]
mov ebp, dword [ebp + 4]
mov dword [eax + ebx + 8], ebp
mov ebx, dword [esi]
mov ebp, dword [esp + 0x90]
add esi, 4
mov dword [edx + ebp], ebx
mov ebp, dword [esi]
mov ebx, dword [esp + 0x40]
add esi, 4
mov dword [ebx + eax + 4], ebp
mov ebp, dword [esi]
mov dword [ebx + eax + 8], ebp
mov ebp, dword [0x17efc00]
add esi, 4
cmp ebp, 4
jne 0x504ed6
mov ebp, dword [esi]
mov dword [eax + ebx + 0xc], ebp
add esi, 4
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x3c]
add eax, ebx
add edx, ebx
mov ebx, dword [esp + 0x34]
add ebx, 0xc
inc ebp
mov dword [esp + 0x34], ebx
cmp ebp, dword [0x17efc28]
mov dword [esp + 0x3c], ebp
jl 0x504b20
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0xdc]
mov eax, dword [edx + 0x684]
call fcn.004cafd0
mov eax, dword [0x154906c]
test eax, eax
je 0x504f44
mov edi, dword [esp + 0x98]
mov esi, dword [esp + 0x30]
push ebx
push edi
push esi
push 0x8892
call dword [0x1533ab4]
lea eax, [edi + esi + 0x1f]
and eax, 0xffffffe0
mov dword [0x1549074], eax
jmp 0x504f76
test ebx, ebx
jne 0x504f59
push 0x8892
call dword [0x1534268]
test al, al
je 0x504fb8
jmp 0x504f80
mov edx, dword [0x17efc28]
imul edx, dword [esp + 0x48]
push 0x88e0
push ebx
push edx
push 0x8892
call dword [0x153427c]
push ebx
call dword [0x15485bc]
add esp, 4
mov ecx, dword [esp + 0xe4]
mov ebx, dword [0x1548ab4]
mov eax, dword [esp + 0xe0]
mov edi, dword [0x1548ab8]
push ecx
push 0x1403
add ebx, eax
push eax
inc edi
push 4
mov dword [0x1548ab8], edi
mov dword [0x1548ab4], ebx
call dword [0x15340dc]
push 0
push 0x8892
call dword [0x1533d84]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc8
ret