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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push ebx
push esi
push edi
lea edi, [ebp - 0x120]
mov ecx, 0x48
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x5d72e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x3c], 0
cmp dword [ebp + 8], 0
jne 0x501e7f
mov eax, 0xffffff9a
jmp 0x502616
cmp dword [ebp + 0x28], 0
je 0x501e95
cmp dword [ebp + 0x28], 8
je 0x501e95
mov eax, 0xffffff9a
jmp 0x502616
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x2c], 1
jne 0x501ec1
mov eax, dword [ebp + 8]
push eax
call fcn.00503400
add esp, 4
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x501ec1
mov eax, dword [ebp - 0x3c]
jmp 0x502616
cmp dword [ebp + 0xc], 0
jne 0x501ece
mov dword [ebp + 0xc], 0x595450
cmp dword [ebp + 0x24], 0
jne 0x501edd
mov dword [ebp - 0x24], 0
jmp 0x501eec
mov eax, dword [ebp + 0x24]
push eax
call fcn.005374c0
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.005374c0
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp + 0x10], 0
jne 0x501f10
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x4088], 0
jmp 0x501f46
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x18], 0
je 0x501f2a
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x18]
mov dword [eax + 0x4088], edx
jmp 0x501f46
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.00502bf0
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x4088], eax
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x7c], 0
cmp dword [ebp + 0x2c], 8
je 0x501f5c
cmp dword [ebp + 0x2c], 9
jne 0x501f6b
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x7c]
or ecx, 2
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x7c], ecx
cmp dword [ebp + 0x2c], 2
jne 0x501f80
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x7c]
or ecx, 4
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x7c], ecx
cmp dword [ebp + 0x2c], 1
jne 0x501f95
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x7c]
or ecx, 6
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x7c], ecx
cmp dword [ebp + 0x40], 0
je 0x501faa
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x7c]
or ecx, 1
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x7c], ecx
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x408c], 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x28]
mov dword [eax + 0x80], ecx
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x4090], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x68], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x6c], 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x30]
mov dword [eax + 0x84], ecx
mov esi, esp
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x1c]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0xc]
call edx
add esp, 8
cmp esi, esp
call fcn.00536e5e
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x70], eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax + 0x2e]
add edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x78], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x78]
push ecx
call fcn.00532491
add esp, 4
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x74], eax
push 4
push 0x2014b50
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
push ecx
call fcn.00502b60
add esp, 0xc
push 2
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 4
push ecx
call fcn.00502b60
add esp, 0xc
push 2
push 0x14
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 6
push ecx
call fcn.00502b60
add esp, 0xc
push 2
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x7c]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x74]
add eax, 8
push eax
call fcn.00502b60
add esp, 0xc
push 2
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x80]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x74]
add eax, 0xa
push eax
call fcn.00502b60
add esp, 0xc
push 4
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4088]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x74]
add eax, 0xc
push eax
call fcn.00502b60
add esp, 0xc
push 4
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 0x10
push ecx
call fcn.00502b60
add esp, 0xc
push 4
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 0x14
push ecx
call fcn.00502b60
add esp, 0xc
push 4
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 0x18
push ecx
call fcn.00502b60
add esp, 0xc
push 2
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x74]
add edx, 0x1c
push edx
call fcn.00502b60
add esp, 0xc
push 2
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x74]
add edx, 0x1e
push edx
call fcn.00502b60
add esp, 0xc
push 2
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x74]
add edx, 0x20
push edx
call fcn.00502b60
add esp, 0xc
push 2
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 0x22
push ecx
call fcn.00502b60
add esp, 0xc
cmp dword [ebp + 0x10], 0
jne 0x502197
push 2
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 0x24
push ecx
call fcn.00502b60
add esp, 0xc
jmp 0x5021b2
push 2
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x1c]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x74]
add eax, 0x24
push eax
call fcn.00502b60
add esp, 0xc
cmp dword [ebp + 0x10], 0
jne 0x5021d0
push 4
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 0x26
push ecx
call fcn.00502b60
add esp, 0xc
jmp 0x5021eb
push 4
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x74]
add eax, 0x26
push eax
call fcn.00502b60
add esp, 0xc
push 4
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax + 0x70]
sub edx, dword [ecx + 0x40ac]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
add ecx, 0x2a
push ecx
call fcn.00502b60
add esp, 0xc
mov dword [ebp - 0x30], 0
jmp 0x502221
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x18]
jae 0x502240
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x30]
mov dl, byte [edx]
mov byte [ecx + eax + 0x2e], dl
jmp 0x502218
mov dword [ebp - 0x30], 0
jmp 0x502252
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 0x20]
jae 0x502277
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
mov edx, dword [ebp - 0x18]
lea eax, [ecx + edx + 0x2e]
mov ecx, dword [ebp + 0x1c]
add ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x30]
mov cl, byte [ecx]
mov byte [eax + edx], cl
jmp 0x502249
mov dword [ebp - 0x30], 0
jmp 0x502289
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x24]
jae 0x5022b1
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x74]
mov edx, dword [ebp - 0x18]
lea eax, [ecx + edx + 0x2e]
add eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x24]
add ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x30]
mov cl, byte [ecx]
mov byte [eax + edx], cl
jmp 0x502280
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x74], 0
jne 0x5022c4
mov eax, 0xffffff98
jmp 0x502616
push 4
push 0x4034b50
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x502301
push 2
push 0x14
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x502326
push 2
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x7c]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x50234e
push 2
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x80]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x502376
push 4
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4088]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x502396
push 4
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x5023b6
push 4
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x5023d6
push 4
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x5023f8
push 2
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x20]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x50241a
push 2
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x20]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00502a70
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x50245c
cmp dword [ebp - 0x18], 0
jbe 0x50245c
mov esi, esp
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
call ecx
add esp, 0x10
cmp esi, esp
call fcn.00536e5e
cmp eax, dword [ebp - 0x18]
je 0x50245c
mov dword [ebp - 0x3c], 0xffffffff
cmp dword [ebp - 0x3c], 0
jne 0x50249e
cmp dword [ebp + 0x18], 0
jbe 0x50249e
mov esi, esp
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
call ecx
add esp, 0x10
cmp esi, esp
call fcn.00536e5e
cmp eax, dword [ebp + 0x18]
je 0x50249e
mov dword [ebp - 0x3c], 0xffffffff
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x34], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x40], 0x4000
mov eax, dword [ebp - 0xc]
add eax, 0x88
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x38], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x44], 0
cmp dword [ebp - 0x3c], 0
jne 0x502559
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x80], 8
jne 0x502559
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x84], 0
jne 0x502559
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x50], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x54], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x58], 0
cmp dword [ebp + 0x34], 0
jle 0x50251e
mov eax, dword [ebp + 0x34]
neg eax
mov dword [ebp + 0x34], eax
push 0x38
push 0x5953f8
mov eax, dword [ebp + 0x3c]
push eax
mov ecx, dword [ebp + 0x38]
push ecx
mov edx, dword [ebp + 0x34]
push edx
push 8
mov eax, dword [ebp + 0x2c]
push eax
mov ecx, dword [ebp - 0xc]
add ecx, 0x30
push ecx
call fcn.00507fd0
add esp, 0x20
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x502559
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x68], 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x40a4], 0
cmp dword [ebp - 0x3c], 0
jne 0x502603
cmp dword [ebp + 0x40], 0
je 0x502603
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x4090], 1
call fcn.005074f0
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40a0], eax
mov eax, dword [ebp + 0x44]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x40a0]
push edx
mov eax, dword [ebp - 0xc]
add eax, 0x4094
push eax
push 0xc
lea ecx, [ebp - 0x50]
push ecx
mov edx, dword [ebp + 0x40]
push edx
call fcn.00502670
add esp, 0x18
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x5c]
mov dword [eax + 0x40a4], ecx
mov esi, esp
mov eax, dword [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x50]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
call ecx
add esp, 0x10
cmp esi, esp
call fcn.00536e5e
cmp eax, dword [ebp - 0x5c]
je 0x502603
mov dword [ebp - 0x3c], 0xffffffff
cmp dword [ebp - 0x3c], 0
jne 0x502613
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x2c], 1
mov eax, dword [ebp - 0x3c]
push edx
mov ecx, ebp
push eax
lea edx, [0x502648]
call fcn.00536e81
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053042b
add esp, 0x120
cmp ebp, esp
call fcn.00536e5e
mov esp, ebp
pop ebp
ret