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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1b8]
mov eax, dword [eax]
test byte [eax + 0x40], 1
push edi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x10], eax
je 0x504c63
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x1c]
lea ebx, [ebx + ebx*4]
shl ebx, 4
cmp dword [ebp + 0x14], 0
mov edx, dword [ebx + ecx + 0x38]
mov edi, dword [ebx + ecx + 0x1c]
lea eax, [ebx + ecx + 0x1c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x40], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edi
je 0x504cce
cmp dword [ebp + 0x10], 0
jne 0x504c5a
cmp dword [ecx], 1
jg 0x504c5a
mov eax, dword [esi + 0x20]
test eax, eax
je 0x504cad
test dword [eax + 4], 0x200000
jne 0x504c5a
mov ecx, dword [esi]
call fcn.004e18b0
test eax, 0x200000
jne 0x504c5a
mov ecx, dword [esi + 0x2c]
call fcn.004e18b0
test eax, 0x200000
jne 0x504c5a
mov ecx, dword [esp + 0x14]
mov eax, dword [edi + 0x38]
test eax, eax
je 0x504cdf
cmp dword [esi + 0x38], 0
jne 0x504c5a
cmp dword [edi + 0x3c], 0
jne 0x504c5a
test dword [esi + 8], 0x100
je 0x504cfa
test eax, eax
jne 0x504c5a
mov edx, dword [edi + 0x1c]
mov edx, dword [edx]
mov dword [esp + 0x34], edx
test edx, edx
je 0x504c5a
mov edx, dword [edi + 8]
mov dword [esp + 0x30], edx
test dl, 1
jne 0x504c5a
test eax, eax
je 0x504d32
cmp dword [ecx], 1
jg 0x504c5a
cmp dword [ebp + 0x10], 0
jne 0x504c5a
mov edx, dword [esi + 8]
and edx, 1
mov dword [esp + 0x20], edx
je 0x504d48
cmp dword [ebp + 0x14], 0
jne 0x504c5a
cmp dword [esi + 0x2c], 0
je 0x504d58
cmp dword [edi + 0x2c], 0
jne 0x504c5a
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x504d69
cmp dword [edi + 0x2c], 0
jne 0x504c5a
test eax, eax
je 0x504d86
cmp dword [esi + 0x20], 0
jne 0x504c5a
test eax, eax
je 0x504d86
cmp dword [esp + 0x20], 0
jne 0x504c5a
test dword [esp + 0x30], 0x3000
jne 0x504c5a
test dword [esi + 8], 0x2000
je 0x504da7
cmp dword [edi + 0x30], 0
jne 0x504c5a
test byte [ebx + ecx + 0x2c], 0x20
lea eax, [ebx + ecx + 0x2c]
mov dword [esp + 0x3c], eax
je 0x504de0
mov eax, 1
cmp dword [esp + 0x34], eax
mov dword [esp + 0x2c], eax
jg 0x504c5a
test edx, edx
jne 0x504c5a
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + 0x18]
cmp dword [eax + 0x38], edx
jne 0x504c5a
cmp dword [edi + 0x30], 0
je 0x504e65
cmp dword [edi + 0x2c], 0
jne 0x504c5a
test edx, edx
jne 0x504c5a
cmp dword [esp + 0x20], edx
jne 0x504c5a
cmp dword [ecx], 1
jne 0x504c5a
mov eax, edi
mov dl, 9
nop
test byte [eax + 8], dl
jne 0x504c5a
mov ecx, dword [eax + 0x30]
test ecx, ecx
je 0x504e2a
cmp byte [eax + 4], 0x74
jne 0x504c5a
mov eax, dword [eax + 0x1c]
cmp dword [eax], 1
jl 0x504c5a
mov eax, ecx
test eax, eax
jne 0x504e10
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x504e65
cmp dword [ecx], eax
jle 0x504e65
add ecx, 0x1c
lea ebx, [ebx]
cmp word [ecx], 0
je 0x504c5a
mov edx, dword [esi + 0x2c]
inc eax
add ecx, 0x18
cmp eax, dword [edx]
jl 0x504e50
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + eax + 0x10]
push 0
lea edi, [ebx + eax + 0x10]
mov eax, dword [ebp + 8]
push 0
push 0
push 0x15
mov dword [esp + 0x44], edi
mov dword [eax + 0x1b8], ecx
call fcn.004e9b50
mov eax, dword [ebp + 8]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x28]
mov dword [eax + 0x1b8], edx
mov eax, dword [ecx + 0x30]
add esp, 0x10
mov dword [esp + 0x18], eax
test eax, eax
je 0x504f46
mov edi, edi
mov eax, dword [esi + 0x30]
mov edx, dword [esi + 0x3c]
mov ecx, dword [esp + 0x10]
mov edi, dword [esi + 0x2c]
mov ebx, dword [esi + 0x38]
mov dword [esp + 0x20], eax
xor eax, eax
push eax
push esi
push ecx
mov dword [esp + 0x44], edx
mov dword [esi + 0x2c], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
call fcn.004e1360
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x20]
add esp, 0xc
mov dword [esi + 0x3c], edx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x2c], edi
mov dword [esi + 0x1c], ecx
mov byte [esi + 4], 0x74
test eax, eax
jne 0x504f09
mov edx, dword [esp + 0x20]
mov dword [esi + 0x30], edx
jmp 0x504f1d
mov ecx, dword [esp + 0x20]
mov dword [eax + 0x30], ecx
test ecx, ecx
je 0x504f17
mov dword [ecx + 0x34], eax
mov dword [eax + 0x34], esi
mov dword [esi + 0x30], eax
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x45], 0
jne 0x50521c
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0x30]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x504eb0
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
mov eax, dword [ebx + eax + 0xc]
call fcn.004afaf0
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
call fcn.004afaf0
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + ecx + 0x14]
mov ecx, dword [esp + 0x10]
call fcn.004afaf0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov dword [ebx + eax + 0xc], ecx
mov dword [ebx + eax + 0x14], ecx
lea ebx, [ebx + eax + 0x18]
mov eax, dword [ebx]
mov dword [edi], ecx
mov dword [edx], ecx
cmp eax, ecx
je 0x504fdc
mov ecx, dword [eax + 0x20]
cmp ecx, 1
jne 0x504fd2
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x78]
test ecx, ecx
jne 0x504fb5
mov ecx, edx
mov edx, dword [ecx + 0x1c8]
mov dword [eax + 0x4c], edx
mov edi, esi
mov dword [ecx + 0x1c8], eax
mov dword [ebx], 0
mov dword [esp + 0x20], edi
jmp 0x504fe8
dec ecx
mov dword [eax + 0x20], ecx
mov dword [ebx], 0
mov edi, esi
mov dword [esp + 0x20], edi
jmp 0x504fe8
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov ebx, dword [eax + 0x1c]
mov eax, dword [edi + 0x1c]
mov esi, dword [ebx]
mov byte [esp + 0xf], 0
mov dword [esp + 0x14], eax
test eax, eax
je 0x50500d
mov ecx, dword [esp + 0x3c]
mov dl, byte [ecx]
mov byte [esp + 0xf], dl
jmp 0x50502f
mov eax, dword [esp + 0x10]
push 0
push eax
xor ecx, ecx
xor eax, eax
call fcn.004ef030
add esp, 8
mov dword [edi + 0x1c], eax
mov dword [esp + 0x14], eax
test eax, eax
je 0x50520b
cmp esi, 1
jle 0x505060
mov ecx, dword [ebp + 0xc]
inc ecx
push ecx
lea edx, [esi - 1]
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
call fcn.004eef20
mov ecx, dword [esp + 0x20]
add esp, 0x10
mov dword [edi + 0x1c], eax
cmp byte [ecx + 0x45], 0
mov dword [esp + 0x14], eax
jne 0x50520b
test esi, esi
jle 0x5050c0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
lea ecx, [edx + eax + 8]
add ebx, 8
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], esi
jmp 0x505080
mov edx, dword [esp + 0x1c]
mov edi, dword [edx + 0x38]
mov esi, dword [esp + 0x10]
call fcn.004eedd0
mov edi, dword [esp + 0x1c]
push 0x50
mov ecx, 0x14
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0x30]
push 0
push ebx
mov dword [esp + 0x34], eax
call fcn.0052e300
add dword [esp + 0x28], 0x50
add esp, 0xc
add ebx, 0x50
sub dword [esp + 0x30], 1
jne 0x505080
mov al, byte [esp + 0xf]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov byte [ecx + edx + 0x2c], al
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x505101
xor ecx, ecx
cmp dword [eax], ecx
jle 0x5050f1
lea edx, [eax + 0x1c]
xor esi, esi
mov word [edx], si
inc ecx
add edx, 0x18
cmp ecx, dword [eax]
jl 0x5050e4
mov esi, dword [esp + 0x20]
mov dword [esi + 0x2c], eax
mov dword [ebx + 0x2c], 0
jmp 0x505105
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0x20]
mov edi, dword [esp + 0x10]
test eax, eax
je 0x505124
push 0
push 0
push eax
push edi
call fcn.004e0c80
add esp, 0x10
mov dword [esp + 0x1c], eax
jmp 0x50512c
mov dword [esp + 0x1c], 0
cmp dword [esp + 0x2c], 0
jle 0x505145
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
push ecx
push edx
call fcn.004fffd0
add esp, 8
cmp dword [ebp + 0x14], 0
je 0x50518b
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x20], ecx
mov dword [esi + 0x28], eax
mov eax, dword [ebx + 0x28]
push edi
xor ecx, ecx
call fcn.004e0fd0
add esp, 4
push eax
mov eax, dword [esi + 0x28]
mov ecx, edi
call fcn.004e07f0
add esp, 4
mov dword [esi + 0x28], eax
mov edx, dword [ebx + 0x24]
push 0
push edx
push edi
call fcn.004e1000
add esp, 0xc
mov dword [esi + 0x24], eax
jmp 0x5051a0
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esi + 0x20]
mov ecx, edi
call fcn.004e07f0
add esp, 4
mov dword [esi + 0x20], eax
cmp byte [edi + 0x45], 0
jne 0x5051db
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x40]
push 0
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x4c], edx
mov edx, dword [ebx]
lea eax, [esp + 0x48]
push esi
push eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edx
call fcn.00504ac0
add esp, 0xc
mov ecx, dword [ebx + 8]
and ecx, 1
or dword [esi + 8], ecx
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x5051f5
mov dword [esi + 0x38], eax
mov dword [ebx + 0x38], 0
mov esi, dword [esi + 0x30]
mov edx, dword [ebx + 0x30]
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], edx
test esi, esi
jne 0x504fe4
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x3c]
call fcn.004ffcd0
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret