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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0xc0]
cmp eax, dword [ecx + 8]
jbe 0x501dca
sub esp, 0x140
mov eax, dword [esp + 0x14c]
test eax, eax
jle 0x501d8b
mov ecx, dword [esp + 0x158]
test ecx, ecx
jle 0x501d76
lea edx, [eax - 1]
cmp edx, eax
jae 0x501dc3
mov edx, dword [esp + 0x144]
lea ebx, [edx + eax*4 - 4]
lea ebp, [ecx - 1]
cmp ebp, ecx
jae 0x501dc3
mov ebp, dword [esp + 0x150]
lea esi, [ebp + ecx*4 - 4]
cmp esi, ebx
sete bl
test bl, bl
je 0x501d05
xor eax, eax
xor edx, edx
xor ebx, ebx
mov esi, dword [esp + 0x16c]
cmp esi, 1
jne 0x5011de
mov edi, dword [esp + 0x168]
mov edi, dword [edi]
cmp edi, 1
je 0x501ce5
mov edi, dword [esp + 0x160]
test edi, edi
je 0x501c85
cmp edi, 1
jne 0x501208
mov edi, dword [esp + 0x15c]
mov edi, dword [edi]
cmp edi, 1
jne 0x501208
test esi, esi
jne 0x501c08
test esi, esi
je 0x501214
cmp esi, edx
jg 0x501bcd
mov eax, dword [esp + 0x154]
cmp eax, edx
jg 0x501b87
mov edi, eax
cmp eax, edi
jle 0x501b80
mov dword [esp + 0x48], eax
mov dword [esp + 0x13c], ebx
mov dword [esp + 0x4c], edx
cmp ebx, ebp
je 0x501253
mov dword [esp], ebx
mov dword [esp + 4], ebp
shl edi, 2
mov dword [esp + 8], edi
call fcn.0044d420
mov eax, dword [esp + 0x150]
mov dword [esp], eax
mov ecx, dword [esp + 0x154]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x158]
mov dword [esp + 8], edx
mov ebx, dword [0xbae7a8]
mov ebp, dword [0xbae7a4]
mov esi, dword [0xbae7a0]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebx
call fcn.004fc380
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x501b6d
mov eax, dword [esp + 0x160]
cmp eax, 1
jle 0x501b61
mov edx, dword [esp + 0x16c]
test edx, edx
jg 0x501a22
mov ebx, dword [esp + 0x15c]
mov ebp, dword [ebx + eax*4 - 4]
cmp ebp, 0x10000
jb 0x501a19
mov esi, ebp
shr ebp, 0x10
mov ecx, 0x10
cmp ebp, 0x100
jb 0x501a12
shr ebp, 8
lea edi, [ecx + 8]
cmp ebp, 0x100
jae 0x501dae
mov ecx, ebx
lea ebx, [0xb76660]
movzx ebx, byte [ebx + ebp]
lea ebx, [ebx + edi - 0x20]
neg ebx
lea ebp, [ebx + 1]
mov edi, ecx
mov ecx, ebp
shl esi, cl
cmp ecx, 0x20
sbb ebp, ebp
and esi, ebp
add ebx, 0xffffffe1
neg ebx
mov dword [esp + 0x58], ebx
xor ecx, ecx
mov ebp, dword [esp + 0x48]
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0x54], ebp
xor ebp, ebp
mov dword [esp + 0x138], ebp
xor ecx, ecx
mov dword [esp + 0xb4], ecx
xor ecx, ecx
mov dword [esp + 0x50], ecx
xor ecx, ecx
mov dword [esp + 0x64], ecx
xor ecx, ecx
mov dword [esp + 0x60], ecx
xor ecx, ecx
mov dword [esp + 0x134], ecx
xor ecx, ecx
mov dword [esp + 0xb0], ecx
xor ecx, ecx
mov dword [esp + 0x130], ecx
xor ecx, ecx
mov dword [esp + 0xac], ecx
mov ebp, dword [esp + 0x48]
xor ecx, ecx
jmp 0x5013ee
mov ebp, dword [esp + 0x74]
inc ebp
shl ebx, 1
mov dword [esp + 0x54], edx
mov dword [esp + 0x13c], eax
mov dword [esp + 0x138], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x118], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0xb0], eax
mov dword [esp + 0x110], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 0xac], ecx
mov eax, dword [esp + 0x160]
mov edx, dword [esp + 0x16c]
mov edi, dword [esp + 0x15c]
mov ecx, ebp
mov esi, ebx
mov ebp, dword [esp + 0x110]
mov ebx, dword [esp + 0x58]
cmp ecx, ebx
jge 0x501650
mov dword [esp + 0xa8], ebp
mov dword [esp + 0x74], ecx
mov dword [esp + 0x5c], esi
mov eax, dword [esp + 0x138]
mov dword [esp], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x13c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebp
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x14], ecx
call fcn.004fe3c0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x5c]
test ebx, 0x80000000
jne 0x5015b1
mov ebp, dword [esp + 0x16c]
test ebp, ebp
mov esi, dword [esp + 0x13c]
mov edi, dword [esp + 0xa8]
jne 0x5014c3
mov dword [esp + 0x108], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xb4], eax
mov dword [esp + 0x100], ecx
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0xf8], edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x68], edx
mov eax, dword [esp + 0x108]
mov ecx, dword [esp + 0x100]
mov edx, dword [esp + 0xf8]
jmp 0x501389
mov dword [esp + 0xa4], edx
mov dword [esp + 0xa0], ecx
mov dword [esp + 0x12c], eax
mov dword [esp], esi
mov dword [esp + 4], edi
mov ebx, dword [esp + 0x54]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x134]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov ebx, dword [esp + 0x168]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebp
mov esi, dword [esp + 0x170]
mov dword [esp + 0x2c], esi
call fcn.004fef60
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0xb0]
mov dword [esp + 0xb4], edi
mov edi, dword [esp + 0xac]
mov edi, dword [esp + 0xa4]
mov dword [esp + 0x64], edi
mov edi, dword [esp + 0xa0]
mov dword [esp + 0x60], edi
mov edi, dword [esp + 0x12c]
mov dword [esp + 0x134], edi
mov dword [esp + 0x6c], edx
mov dword [esp + 0x68], ecx
mov edx, esi
mov ecx, ebp
mov esi, dword [esp + 0x130]
mov dword [esp + 0x130], eax
mov edi, dword [esp + 0xac]
mov ebp, dword [esp + 0x16c]
mov eax, ebx
mov ebx, dword [esp + 0x5c]
jmp 0x501389
mov dword [esp + 0x120], eax
mov dword [esp + 0x9c], ecx
mov dword [esp + 0x98], edx
mov ebx, dword [esp + 0x13c]
mov dword [esp], ebx
mov ebx, dword [esp + 0xa8]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x54]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov ebx, dword [esp + 0x150]
mov dword [esp + 0x18], ebx
mov ebp, dword [esp + 0x154]
mov dword [esp + 0x1c], ebp
mov esi, dword [esp + 0x158]
mov dword [esp + 0x20], esi
call fcn.004fd450
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x16c]
test ebp, ebp
mov ebx, dword [esp + 0x5c]
mov esi, dword [esp + 0x120]
mov edi, dword [esp + 0x9c]
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x54], ebx
mov ebx, dword [esp + 0x5c]
jmp 0x501471
lea ecx, [eax - 2]
mov ebx, dword [esp + 0xac]
mov esi, dword [esp + 0xb0]
mov dword [esp + 0xf0], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x14c], eax
mov eax, dword [esp + 0xf0]
jmp 0x501979
mov ebp, dword [esp + 0x70]
inc ebp
shl ebx, 1
mov dword [esp + 0x70], ebp
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x138], eax
mov dword [esp + 0xb0], edx
mov ebp, ecx
mov ecx, dword [esp + 0xc8]
mov dword [esp + 0x13c], ecx
mov edi, ebx
mov esi, dword [esp + 0x6c]
mov ebx, dword [esp + 0x68]
mov eax, dword [esp + 0x160]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x16c]
mov eax, dword [esp + 0x70]
cmp eax, 0x20
jge 0x501935
mov dword [esp + 0x94], ebp
mov dword [esp + 0x90], esi
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x5c], edi
mov eax, dword [esp + 0x138]
mov dword [esp], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x13c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebp
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0x14], ecx
call fcn.004fe3c0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x5c]
test ebx, 0x80000000
jne 0x501896
mov ebp, dword [esp + 0x16c]
test ebp, ebp
mov esi, dword [esp + 0xb0]
mov edi, dword [esp + 0x94]
jne 0x5017a5
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x6c], eax
mov dword [esp + 0xb8], ecx
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x68], ecx
mov eax, dword [esp + 0xc0]
mov ecx, dword [esp + 0xb8]
jmp 0x50167f
mov dword [esp + 0x88], ecx
mov dword [esp + 0x128], eax
mov dword [esp + 0x84], edx
mov ebx, dword [esp + 0x13c]
mov dword [esp], ebx
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov ebx, dword [esp + 0x134]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov ebx, dword [esp + 0x168]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebp
mov esi, dword [esp + 0x170]
mov dword [esp + 0x2c], esi
call fcn.004fef60
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x8c]
mov edi, dword [esp + 0x130]
mov dword [esp + 0x13c], edi
mov edi, dword [esp + 0x88]
mov dword [esp + 0x60], edi
mov edi, dword [esp + 0x84]
mov dword [esp + 0x64], edi
mov edi, dword [esp + 0x128]
mov dword [esp + 0x134], edi
mov dword [esp + 0x6c], edx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x130], eax
mov edx, esi
mov ecx, ebp
mov eax, ebx
mov edi, dword [esp + 0x8c]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x16c]
mov esi, dword [esp + 0x90]
jmp 0x50167f
mov dword [esp + 0x124], eax
mov dword [esp + 0x80], ecx
mov dword [esp + 0x7c], edx
mov ebx, dword [esp + 0x13c]
mov dword [esp], ebx
mov ebx, dword [esp + 0x94]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0xb0]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov ebx, dword [esp + 0x150]
mov dword [esp + 0x18], ebx
mov ebp, dword [esp + 0x154]
mov dword [esp + 0x1c], ebp
mov esi, dword [esp + 0x158]
mov dword [esp + 0x20], esi
call fcn.004fd450
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x16c]
test ebp, ebp
mov ebx, dword [esp + 0x5c]
mov esi, dword [esp + 0x7c]
mov edi, dword [esp + 0x80]
mov ebx, dword [esp + 0x124]
mov dword [esp + 0x13c], ebx
mov ebx, dword [esp + 0x5c]
jmp 0x50176c
dec ecx
mov eax, dword [esp + 0x160]
mov edi, dword [esp + 0x15c]
mov dword [esp + 0xe8], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xb4], eax
mov dword [esp + 0xe0], ecx
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0x14c], ecx
mov eax, dword [esp + 0xe8]
mov ecx, dword [esp + 0xe0]
test ecx, ecx
jl 0x5019cc
cmp ecx, eax
jae 0x501da7
mov dword [esp + 0x78], ecx
mov edi, dword [edi + ecx*4]
mov dword [esp + 0xd8], eax
xor eax, eax
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x54], eax
mov dword [esp + 0xd0], ecx
mov ecx, dword [esp + 0x14c]
mov dword [esp + 0xb0], ecx
mov eax, dword [esp + 0xd8]
mov ecx, dword [esp + 0xd0]
jmp 0x5016da
mov eax, dword [esp + 0x13c]
mov dword [esp], eax
mov dword [esp + 4], ebp
mov eax, dword [esp + 0x14c]
mov dword [esp + 8], eax
call fcn.004fbcd0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x174], eax
mov dword [esp + 0x178], ecx
mov dword [esp + 0x17c], edx
add esp, 0x140
ret
mov edi, ecx
jmp 0x5012f4
mov esi, ebp
xor ecx, ecx
jmp 0x5012e2
mov ecx, dword [esp + 0x168]
mov ebx, dword [ecx]
and ebx, 1
cmp ebx, 1
jne 0x501acc
mov ebx, dword [esp + 0x13c]
mov dword [esp], ebx
mov ebx, dword [esp + 0x48]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x150]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x154]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x158]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x15c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x164]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x170]
mov dword [esp + 0x2c], eax
call fcn.00502790
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x174], edx
mov dword [esp + 0x178], ecx
mov dword [esp + 0x17c], eax
add esp, 0x140
ret
mov ebx, dword [esp + 0x13c]
mov dword [esp], ebx
mov ebx, dword [esp + 0x48]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x150]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x154]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x158]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x15c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x164]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x170]
mov dword [esp + 0x2c], eax
call fcn.00501de0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x174], eax
mov dword [esp + 0x178], ecx
mov dword [esp + 0x17c], edx
add esp, 0x140
ret
mov edx, dword [esp + 0x16c]
jmp 0x5012c1
mov eax, dword [esp + 0x160]
mov edx, dword [esp + 0x16c]
jmp 0x5012c1
mov edi, eax
jmp 0x50122d
lea ecx, [0x7715e0]
mov dword [esp], ecx
mov dword [esp + 4], eax
lea ecx, [eax + 4]
mov dword [esp + 8], ecx
call fcn.00438c00
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x158]
mov ebp, dword [esp + 0x150]
mov esi, dword [esp + 0x16c]
mov edi, dword [esp + 0x154]
jmp 0x501225
lea eax, [0x7715e0]
mov dword [esp], eax
mov dword [esp + 4], esi
lea ecx, [esi + 4]
mov dword [esp + 8], ecx
call fcn.00438c00
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x158]
mov ebp, dword [esp + 0x150]
mov esi, dword [esp + 0x16c]
jmp 0x501214
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x154]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x168]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
mov eax, dword [esp + 0x170]
mov dword [esp + 0x2c], eax
call fcn.004fef60
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x174], edx
mov dword [esp + 0x178], ecx
mov dword [esp + 0x17c], eax
add esp, 0x140
ret
cmp edx, 1
jl 0x501cb9
mov eax, 1
test eax, eax
jbe 0x501db5
mov dword [ebx], 1
mov dword [esp + 0x174], ebx
mov dword [esp + 0x178], eax
mov dword [esp + 0x17c], edx
add esp, 0x140
ret
lea eax, [0x7715e0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 5
call fcn.00438c00
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0xc]
jmp 0x501c8f
mov dword [esp + 0x174], ebx
mov dword [esp + 0x178], 0
mov dword [esp + 0x17c], edx
add esp, 0x140
ret
test eax, eax
jle 0x501d6b
mov ebx, dword [esp + 0x164]
test ebx, ebx
jle 0x501d60
lea esi, [eax - 1]
cmp esi, eax
jae 0x501dbc
lea esi, [edx + eax*4 - 4]
lea edi, [ebx - 1]
cmp edi, ebx
jae 0x501dbc
mov edi, dword [esp + 0x15c]
lea ebx, [edi + ebx*4 - 4]
cmp ebx, esi
sete bl
test bl, bl
jne 0x5011ba
mov eax, dword [esp + 0x148]
mov edx, dword [esp + 0x14c]
mov ebx, dword [esp + 0x144]
jmp 0x5011c0
mov edi, dword [esp + 0x15c]
xor ebx, ebx
jmp 0x501d3e
mov edi, dword [esp + 0x15c]
xor ebx, ebx
jmp 0x501d3e
mov edx, dword [esp + 0x144]
mov ebp, dword [esp + 0x150]
xor ebx, ebx
jmp 0x5011b2
mov ecx, dword [esp + 0x158]
mov edx, dword [esp + 0x144]
mov ebp, dword [esp + 0x150]
xor ebx, ebx
jmp 0x5011b2
call fcn.00426630
ud2
call fcn.00426630
ud2
call fcn.00426630
ud2
call fcn.00426630
ud2
call fcn.00426630
ud2
call fcn.0044b4c0
jmp fcn.00501140