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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x51f4f8
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
lea edi, [esi + 0x4c]
cmp eax, edx
jne 0x5042d6
mov edx, dword [esi + 0x44]
mov ebx, 5
sub eax, edx
mov ebp, eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x504267
mov dword [eax + 0xc], ebx
mov eax, dword [esi + 0x48]
mov ecx, dword [esi]
lea edx, [esp + 0x28]
mov dword [edi], eax
mov ecx, dword [ecx]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 0
mov eax, dword [eax + 8]
test eax, 0x40000
jne 0x5042b6
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 1
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov ebp, dword [esi + 4]
mov bl, byte [eax]
mov byte [esp + 0x14], bl
and ebx, 0xff
mov ecx, dword [ebp]
mov cl, byte [ebx + ecx + 4]
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
add ecx, 0xffffffef
cmp ecx, 0x27
ja case.0x50430e.29
xor ebx, ebx
mov bl, byte [ecx + 0x504adc]
jmp dword [ebx*4 + 0x504aa8]
mov al, 7
jmp 0x504a8d
mov al, 0x1b
jmp 0x504a8d
mov al, 0xc
jmp 0x504a8d
mov al, 0xa
jmp 0x504a8d
mov al, 0xd
jmp 0x504a8d
mov al, 9
jmp 0x504a8d
mov al, 0xb
jmp 0x504a8d
mov al, 8
jmp 0x504a8d
inc eax
cmp eax, edx
mov dword [edi], eax
jne 0x5043de
mov edx, dword [esi + 0x44]
mov ebx, 5
sub eax, edx
mov ebp, eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x504370
mov dword [eax + 0xc], ebx
mov edx, dword [esi + 0x48]
mov eax, dword [esi]
mov dword [edi], edx
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 2
test dword [eax + 8], 0x40000
jne 0x5043be
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 3
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
movsx eax, byte [eax]
and eax, 0x8000001f
jns 0x504a8d
dec eax
or eax, 0xffffffe0
inc eax
jmp 0x504a8d
inc eax
cmp eax, edx
mov dword [edi], eax
jne 0x504486
mov edx, dword [esi + 0x44]
mov ebx, 5
sub eax, edx
mov ebp, eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x504419
mov dword [eax + 0xc], ebx
mov edx, dword [esi + 0x48]
mov eax, dword [esi]
mov dword [edi], edx
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 4
test dword [eax + 8], 0x40000
jne 0x504466
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], bl
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov ecx, dword [ebp]
xor ebx, ebx
mov bl, byte [eax]
cmp byte [ebx + ecx + 4], 0xf
jne 0x5045e2
inc eax
cmp eax, edx
mov dword [edi], eax
jne 0x504529
mov edx, dword [esi + 0x44]
mov ebx, 5
sub eax, edx
mov ebp, eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x5044bb
mov dword [eax + 0xc], ebx
mov edx, dword [esi + 0x48]
mov eax, dword [esi]
mov dword [edi], edx
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 6
test dword [eax + 8], 0x40000
jne 0x504509
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 7
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
push ebp
push 0x10
push edx
push edi
call fcn.00505250
mov ecx, dword [edi]
mov edx, dword [esi + 0x48]
add esp, 0x10
cmp ecx, edx
je 0x50455b
test eax, eax
jl 0x50455b
cmp al, 0x7f
jg 0x50455b
mov edx, dword [esi + 4]
mov ebp, dword [edx]
xor edx, edx
mov dl, byte [ecx]
cmp byte [edx + ebp + 4], 0x10
je 0x504a8f
mov edx, dword [esi + 0x44]
mov eax, dword [esi]
sub ecx, edx
mov ebx, ecx
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x504572
mov dword [eax + 0xc], 0xa
mov eax, dword [esi + 0x48]
mov ecx, dword [esi]
lea edx, [esp + 0x28]
mov dword [edi], eax
mov ecx, dword [ecx]
push 0xa
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 8
test dword [eax + 8], 0x40000
jne 0x5045c2
push ebx
lea ecx, [esp + 0x2c]
push 0xa
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 9
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
sub edx, eax
mov dword [esp + 0x14], 2
cmp edx, 2
mov dword [esp + 0x10], edx
lea ecx, [esp + 0x10]
jl 0x5045fd
lea ecx, [esp + 0x14]
mov ecx, dword [ecx]
push ebp
add eax, ecx
push 0x10
push eax
push edi
call fcn.00505250
add esp, 0x10
test eax, eax
jl 0x50461d
test eax, 0xffffff00
je 0x504a92
mov eax, dword [esi]
mov ebp, dword [edi]
mov edx, dword [esi + 0x44]
mov ebx, 5
mov ecx, dword [eax + 0xc]
sub ebp, edx
test ecx, ecx
jne 0x504635
mov dword [eax + 0xc], ebx
mov edx, dword [esi + 0x48]
mov eax, dword [esi]
mov dword [edi], edx
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 0xa
test dword [eax + 8], 0x40000
jne 0x504683
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 0xb
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
sub edx, eax
mov dword [esp + 0x14], 4
cmp edx, 4
mov dword [esp + 0x10], edx
lea ecx, [esp + 0x14]
jg 0x5046be
lea ecx, [esp + 0x10]
mov ebx, dword [ecx]
mov dword [esp + 0x14], eax
inc eax
push ebp
push 8
lea edx, [esp + 0x1c]
push eax
push edx
call fcn.00505250
add esp, 0x10
test eax, eax
je 0x504764
mov eax, dword [esi]
mov ebp, dword [edi]
mov edx, dword [esi + 0x44]
mov ebx, 5
mov ecx, dword [eax + 0xc]
sub ebp, edx
test ecx, ecx
jne 0x5046f6
mov dword [eax + 0xc], ebx
mov eax, dword [esi + 0x48]
mov ecx, dword [esi]
lea edx, [esp + 0x28]
mov dword [edi], eax
mov ecx, dword [ecx]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 0xc
test dword [eax + 8], 0x40000
jne 0x504744
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 0xd
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov edx, dword [edi]
mov eax, dword [esi + 4]
add ebx, edx
push eax
push 8
push ebx
push edi
call fcn.00505250
add esp, 0x10
test eax, eax
jge 0x504a92
mov eax, dword [esi]
mov ebp, dword [edi]
mov edx, dword [esi + 0x44]
mov ebx, 5
mov ecx, dword [eax + 0xc]
sub ebp, edx
test ecx, ecx
jne 0x504798
mov dword [eax + 0xc], ebx
mov edx, dword [esi + 0x48]
mov eax, dword [esi]
mov dword [edi], edx
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 0xe
test dword [eax + 8], 0x40000
jne 0x5047e6
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 0xf
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
inc eax
cmp eax, edx
mov dword [edi], eax
jne 0x504897
mov edx, dword [esi + 0x44]
mov ebx, 5
sub eax, edx
mov ebp, eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x504829
mov dword [eax + 0xc], ebx
mov edx, dword [esi + 0x48]
mov eax, dword [esi]
mov dword [edi], edx
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 0x10
test dword [eax + 8], 0x40000
jne 0x504877
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 0x11
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov ecx, dword [ebp]
xor ebx, ebx
mov bl, byte [eax]
cmp byte [ebx + ecx + 4], 0xf
jne 0x504a63
mov dword [esp + 0x14], eax
mov ecx, dword [ebp]
xor ebx, ebx
mov bl, byte [eax]
cmp byte [ebx + ecx + 4], 0x10
je 0x5048c2
inc eax
cmp eax, edx
mov dword [edi], eax
jne 0x5048ad
mov eax, dword [edi]
cmp eax, edx
jne 0x504952
mov edx, dword [esi + 0x44]
mov ebx, 5
sub eax, edx
mov ebp, eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x5048e4
mov dword [eax + 0xc], ebx
mov edx, dword [esi + 0x48]
mov eax, dword [esi]
mov dword [edi], edx
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ebx
push edx
call fcn.004fc6a0
mov eax, dword [esi]
mov dword [esp + 0x74], 0x12
test dword [eax + 8], 0x40000
jne 0x504932
push ebp
lea ecx, [esp + 0x2c]
push ebx
push ecx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 0x13
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x2c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov ecx, dword [esp + 0x14]
lea edx, [eax + 1]
inc ecx
push eax
lea eax, [esp + 0x1c]
push ecx
push eax
mov ecx, ebp
mov dword [edi], edx
call fcn.00505910
mov eax, dword [esp + 0x20]
mov dword [esp + 0x74], 0x14
test eax, eax
jne 0x504a0d
mov eax, dword [esi]
mov ebx, dword [edi]
mov edx, dword [esi + 0x44]
mov ecx, dword [eax + 0xc]
sub ebx, edx
test ecx, ecx
jne 0x504995
mov dword [eax + 0xc], 3
mov ecx, dword [esi + 0x48]
mov edx, dword [esi]
lea eax, [esp + 0x38]
mov dword [edi], ecx
mov ecx, dword [edx]
push 3
push eax
call fcn.004fc6a0
mov ecx, dword [esi]
mov byte [esp + 0x74], 0x15
test dword [ecx + 8], 0x40000
jne 0x5049e2
push ebx
lea edx, [esp + 0x3c]
push 3
push edx
lea ecx, [esp + 0x54]
call fcn.0050b1b0
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 0x16
call fcn.0050b390
lea ecx, [esp + 0x48]
call fcn.0050b340
push 1
lea ecx, [esp + 0x3c]
call fcn.004fa792
push 1
lea ecx, [esp + 0x1c]
call fcn.004fa792
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
cmp eax, 1
jne 0x504a50
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x504a29
lea ecx, [esp + 0x18]
call fcn.004faff0
mov eax, dword [esp + 0x1c]
jmp 0x504a2e
mov eax, 0x60c17c
mov bl, byte [eax]
push 1
lea ecx, [esp + 0x1c]
call fcn.004fa792
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
push 1
lea ecx, [esp + 0x1c]
mov dword [esp + 0x78], 0xffffffff
call fcn.004fa792
mov eax, dword [edi]
mov edx, dword [esi + 0x44]
sub eax, edx
mov ecx, esi
push eax
push 5
call fcn.004fb420
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov al, byte [esp + 0x14]
mov ecx, dword [edi]
inc ecx
mov dword [edi], ecx
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x68
ret