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

Disassembly:
xor edi, edi
cmp eax, edi
jl 0x47193e
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x38]
inc eax
push edx
lea ebp, [edi + 1]
push eax
mov eax, dword [esp + 0xc0]
push ebp
push eax
lea eax, [ecx + 1]
push eax
lea edx, [esp + 0x30]
push 0x4ce0c4
push edx
call fcn.00499e17
mov eax, dword [esp + 0x38]
add esp, 0x1c
lea ecx, [esi + 0x5c]
push eax
call fcn.004a0181
mov ecx, dword [esi + 0x78]
mov ebx, dword [fcn.004ac424]
push ecx
call ebx
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x18]
push edx
push 0x64
push eax
call dword [fcn.004ac388]
mov ecx, dword [esi + 0xb4]
push 0
push eax
push 0x402
push ecx
call dword [fcn.004ac3f8]
mov edx, dword [esi + 0xb4]
push edx
call ebx
mov eax, dword [0x4df800]
mov ebx, 1
cmp eax, ebx
je 0x4719f0
mov eax, dword [esp + 0x2c]
push eax
call fcn.00508701
nop
test eax, eax
jl 0x471a27
push 0x3e8
lea ecx, [esp + 0x2c]
push 0x3e8
push ecx
call fcn.004727b0
add esp, 0xc
lea edx, [esp + 0x88]
push edx
call fcn.00511cd1
nop
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x104], eax
je 0x471871
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x8c]
cmp ebx, 0x3e8
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
je 0x4717cf
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x50]
push 1
push edx
push eax
call fcn.004fb1e7
nop
push ebx
lea ecx, [esp + 0x2c]
push ebx
push ecx
call fcn.004727b0
mov eax, dword [esp + 0x3c]
add esp, 0xc
lea edx, [esp + 0x50]
push 1
push edx
push eax
call fcn.00501531
nop
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
add edx, ecx
mov ebx, dword [edx]
mov ecx, dword [edx + 4]
mov eax, dword [edx + 8]
mov edx, dword [esp + 0x44]
dec edx
cmp edi, edx
jne 0x471808
cmp dword [esp + 0xc8], 1
jne 0x471808
mov edx, dword [esp + 0xfc]
test edx, edx
jg 0x471808
mov edx, dword [esp + 0x84]
jmp 0x47180a
xor edx, edx
sub eax, ecx
push edx
inc eax
lea edx, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esi + 0xd4]
push edx
call fcn.004663e0
cmp dword [esp + 0x20], 0x3e8
je 0x47184b
push 0x3e8
lea eax, [esp + 0x2c]
push 0x3e8
push eax
call fcn.004727b0
add esp, 0xc
mov ecx, dword [esp + 0xb4]
push ebx
lea edx, [esp + 0x8c]
push ecx
mov ecx, dword [esi + 0xd4]
lea eax, [esp + 0x30]
push edx
push eax
call fcn.004661f0
mov ebx, 1
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004fd45c
nop
test eax, eax
jl 0x471916
jmp 0x50811a
push 0
push 0
push 0
lea edx, [esp + 0x114]
push 0
push edx
call edi
test eax, eax
je 0x4718f2
push 0
push 0
lea eax, [esp + 0x110]
push 0
push eax
call fcn.004fd862
nop
lea ecx, [esp + 0x108]
push ecx
call fcn.0050e458
nop
lea edx, [esp + 0x108]
push edx
call fcn.00507734
nop
cmp dword [0x4df800], ebx
je 0x471a4d
push 0
push 0
push 0
lea eax, [esp + 0x114]
push 0
push eax
call edi
test eax, eax
jne 0x4718a0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
mov edi, ebp
inc edx
add ecx, 0xc
cmp edi, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x3c], ecx
jle 0x4716a5
jmp 0x47193e
push 0x4ce0b8
lea ecx, [esi + 0xe0]
call fcn.0049bfdd
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00505f16
nop
push 0xffffffffffffffff
mov ecx, esi
call fcn.0049d0b4
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
lea ecx, [eax + 1]
inc edx
add edi, ecx
mov ecx, dword [esp + 0xb8]
cmp edx, ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x24], edi
jl 0x47168f
mov edx, dword [esp + 0x2c]
push edx
call fcn.0051898f
nop
push 0
mov ecx, esi
call fcn.0049d0b4
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12c], 4
call fcn.0049bea0
lea ecx, [esp + 0x28]
mov byte [esp + 0x12c], 3
call fcn.004a2025
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4719aa
push eax
call fcn.0049bc0a
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x12c], 0
call fcn.0049bea0
lea ecx, [esp + 0xa4]
mov dword [esp + 0x12c], 0xffffffff
call fcn.0045f350
mov eax, 1
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x120
ret
mov edx, dword [esp + 0x2c]
push edx
call fcn.00518f81
nop
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12c], 4
call fcn.0049bea0
lea ecx, [esp + 0x28]
mov byte [esp + 0x12c], 3
call fcn.004a2025
mov eax, dword [esp + 0x40]
test eax, eax
je 0x471a8b
jmp 0x471a82
push 0x4ce0b8
lea ecx, [esi + 0xe0]
call fcn.0049bfdd
mov eax, dword [esp + 0x2c]
push eax
call fcn.0050c1cc
nop
push 0xffffffffffffffff
mov ecx, esi
call fcn.0049d0b4
jmp 0x4719fb
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.005121dd
nop
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12c], 4
call fcn.0049bea0
lea ecx, [esp + 0x28]
mov byte [esp + 0x12c], 3
call fcn.004a2025
mov eax, dword [esp + 0x40]
test eax, eax
je 0x471a8b
push eax
call fcn.0049bc0a
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x12c], 0
call fcn.0049bea0
lea ecx, [esp + 0xa4]
mov dword [esp + 0x12c], 0xffffffff
call fcn.0045f350
mov eax, ebx
jmp 0x4719d7
pushfd
pushal
mov dword [esp + 0x28], eax
push dword [esp]
mov eax, dword [0x4ac318]
mov word [esp + 0xc], 0x4171
call fcn.004fd5d7
mov eax, dword [esp + 0x28]
push edx
pushfd
push dword [esp + 4]
push esp
lea esp, [esp + 0x3c]
jmp 0x47188a
push edx
mov dword [esp], eax
push esp
mov eax, dword [0x4ac530]
lea esp, [esp + 4]
jg 0x509bac
push 0xb48b436
push ecx
lea esp, [esp + 8]
call fcn.0050abcc
movzx di, dl
not di
lea edi, [ecx + 0x13e15bd7]
mov edi, eax
movsx ax, cl
pop eax
pushfd
lea esp, [esp + 4]
jmp 0x47188a
jmp 0x50cf2a
push edx
push ebp
lea esp, [esp + 8]
call fcn.0050abcc
movsx di, cl
pushal
mov edi, eax
setb al
push 0x7929d7b0
call 0x502593