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

Disassembly:
push 0xffffffffffffffff
push 0x6050eb
mov eax, dword fs:[0]
push eax
sub esp, 0x55c
mov eax, dword [0x767500]
xor eax, esp
mov dword [esp + 0x558], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x767500]
xor eax, esp
push eax
lea eax, [esp + 0x570]
mov dword fs:[0], eax
mov esi, dword [esp + 0x580]
mov edi, dword [esp + 0x584]
mov ebx, ecx
cmp dword [ebx + 0xc8], 0
mov dword [esp + 0x30], ebx
mov dword [esp + 0x64], 1
jne 0x51f1f4
mov dword [esp + 0x64], edi
lea ecx, [esp + 0x88]
call fcn.005d63d0
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0x57c], 0
call dword [0x608334]
lea edx, [esp + 0x368]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x51f221
lea ecx, [esp + 0x368]
push ecx
call fcn.004ffdd0
add esp, 4
lea edx, [esp + 0x254]
mov cl, byte [eax]
mov byte [edx], cl
inc eax
inc edx
test cl, cl
jne 0x51f242
lea edx, [esp + 0x368]
push 0
push edx
call fcn.004ffe70
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x160]
push ecx
lea edx, [esp + 0x47c]
push edx
lea eax, [esp + 0x37c]
push eax
call fcn.005e12e0
add esp, 0x18
test eax, eax
jne 0x51f2a2
lea ecx, [esp + 0x88]
mov dword [esp + 0x578], 0xffffffff
call fcn.0055a670
xor eax, eax
jmp 0x51fac1
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x51f2d4
push edi
push eax
push esi
mov ecx, ebx
call fcn.0051f0f0
lea ecx, [esp + 0x88]
mov esi, eax
mov dword [esp + 0x578], 0xffffffff
call fcn.0055a670
mov eax, esi
jmp 0x51fac1
xor ebx, ebx
xor ebp, ebp
cmp eax, ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], 1
jle 0x51f5aa
lea ecx, [esp + 0x154]
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
cmp eax, 0x30
je 0x51f58e
test eax, eax
je 0x51f58e
lea eax, [esp + 0x46c]
push eax
lea ecx, [esp + 0x268]
push 0x617cbc
push ecx
call fcn.0055d4f1
mov ecx, dword [esp + 0x30]
add esp, 0xc
test ecx, ecx
jle 0x51f368
mov dx, word [0x617cb8]
jmp 0x51f350
lea edi, [esp + 0x264]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x51f358
sub ecx, 1
mov word [edi], dx
jne 0x51f350
mov eax, dword [esp + 0x1c]
mov byte [eax + 3], 0
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x51f372
lea edi, [esp + 0x264]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x51f385
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x264]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x51f3a3
mov dx, word [0x6167a8]
lea eax, [esp + 0x254]
mov word [edi], dx
mov edx, eax
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51f3c0
lea edi, [esp + 0x264]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x51f3d1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x34]
push eax
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [esp + 0x26c]
push ecx
mov ecx, dword [esp + 0x3c]
call fcn.0051cd70
test eax, eax
je 0x51f4ce
mov esi, dword [esp + 0x34]
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call fcn.004aba20
mov ecx, eax
call fcn.00531250
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, esi
call fcn.004aba20
mov ecx, eax
call fcn.005311d0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
add ecx, eax
add edi, edx
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x3c]
mov dword [esp + 0x48], ecx
push edx
lea ecx, [esp + 0x8c]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edi
call fcn.005d62b0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
call fcn.004aba20
mov ecx, eax
call fcn.00531200
mov eax, dword [esp + 0x20]
cmp ebx, eax
jge 0x51f494
mov ebx, eax
mov eax, dword [esp + 0x18]
cmp ebp, eax
jge 0x51f49e
mov ebp, eax
cmp dword [esp + 0x14], 0
je 0x51f58e
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x54]
push eax
mov ecx, esi
call fcn.004aba20
mov ecx, eax
call fcn.00531f90
mov dword [esp + 0x14], 0
jmp 0x51f58e
lea ecx, [esp + 0x264]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.0051aa90
mov esi, eax
test esi, esi
je 0x51f58e
push 0
lea edx, [esp + 0xb4]
push edx
push esi
call fcn.0052ef20
add esp, 0xc
test eax, eax
je 0x51f584
mov eax, dword [esp + 0xb0]
mov edx, dword [esp + 0xb8]
mov ecx, dword [esp + 0xb4]
add edx, eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xbc]
add eax, ecx
mov dword [esp + 0x40], ecx
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x8c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
call fcn.005d62b0
mov eax, dword [esp + 0xc0]
cmp ebx, eax
jge 0x51f552
mov ebx, eax
mov eax, dword [esp + 0xc4]
cmp ebp, eax
jge 0x51f55f
mov ebp, eax
cmp dword [esp + 0x14], 0
je 0x51f584
mov edx, dword [esp + 0xcc]
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x30]
push esi
call fcn.0051bab0
mov eax, dword [esp + 0x24]
add dword [esp + 0x1c], 4
inc eax
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
jl 0x51f303
mov dword [esp + 0x18], ebp
lea ecx, [esp + 0x88]
call fcn.005d62a0
test eax, eax
je 0x51f284
push 0x27
push str.e:prg_vs2008kclib_dx9include..kcClassBasekcClassBase.h
push 0x114
call fcn.005112c0
add esp, 0xc
test eax, eax
je 0x51f5e1
mov ecx, eax
call fcn.0052eea0
mov ebp, eax
jmp 0x51f5e3
xor ebp, ebp
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x8c]
call fcn.005d6270
mov edx, dword [esp + 0x48]
sub edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
sub eax, dword [esp + 0x3c]
push 4
push edx
push eax
mov ecx, ebp
call fcn.0052f010
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push ecx
push edx
mov ecx, ebp
call fcn.004aba20
mov ecx, eax
call fcn.00531270
mov eax, dword [esp + 0x18]
push eax
push ebx
mov ecx, ebp
call fcn.004aba20
mov ecx, eax
call fcn.00531230
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
push ecx
push edx
mov ecx, ebp
call fcn.004aba20
mov ecx, eax
call fcn.00531fb0
xor esi, esi
cmp dword [esp + 0x38], esi
mov dword [esp + 0x24], esi
jle 0x51faa8
lea ebx, [esp + 0x154]
mov dword [esp + 0x34], ebx
mov edi, edi
mov eax, dword [ebx]
cmp eax, 0x30
je 0x51fa8a
test eax, eax
je 0x51fa8a
lea eax, [esp + 0x46c]
push eax
lea ecx, [esp + 0x268]
push 0x617cbc
push ecx
mov dword [esp + 0x28], 0
call fcn.0055d4f1
add esp, 0xc
test esi, esi
jle 0x51f6d0
mov dx, word [0x617cb8]
mov ecx, esi
lea edi, [esp + 0x264]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x51f6c0
sub ecx, 1
mov word [edi], dx
jne 0x51f6b5
mov eax, ebx
mov byte [ebx + 3], 0
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x51f6d8
lea edi, [esp + 0x264]
sub eax, ecx
mov esi, ecx
dec edi
jmp 0x51f6f0
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x51f6f0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x264]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x51f710
mov dx, word [0x6167a8]
lea eax, [esp + 0x254]
mov word [edi], dx
mov edx, eax
jmp 0x51f730
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51f730
lea edi, [esp + 0x264]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x51f741
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x14]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x30]
push eax
push 0
lea ecx, [esp + 0x26c]
push ecx
mov ecx, edi
call fcn.0051cd70
test eax, eax
jne 0x51f7b1
push eax
push eax
lea edx, [esp + 0x26c]
push edx
mov ecx, edi
call fcn.0051f0f0
cmp dword [esp + 0x64], 0
mov esi, eax
mov dword [esp + 0x14], esi
je 0x51f7a7
push esi
push 0
lea eax, [esp + 0x26c]
push eax
mov ecx, edi
call fcn.0051e880
mov dword [esp + 0x1c], 1
jmp 0x51f7b5
mov esi, dword [esp + 0x14]
test esi, esi
je 0x51fa8a
mov edi, dword [0x608334]
lea ecx, [esp + 0x134]
push ecx
call edi
lea edx, [esp + 0x54]
push edx
call edi
lea eax, [esp + 0x68]
push eax
call edi
lea ecx, [esp + 0xd4]
push 0x80
push ecx
call fcn.00500830
add esp, 8
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.004aba20
mov ecx, eax
call fcn.00531250
lea ecx, [esp + 0xa8]
push ecx
lea edx, [esp + 0xb0]
push edx
mov ecx, ebp
call fcn.004aba20
mov ecx, eax
call fcn.00531250
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x7c]
push ecx
mov ecx, esi
call fcn.004aba20
mov ecx, eax
call fcn.00531f90
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x80]
push eax
mov ecx, ebp
call fcn.004aba20
mov ecx, eax
call fcn.00531f90
mov edi, dword [esp + 0x7c]
mov ebx, dword [esp + 0x84]
sub edi, dword [esp + 0x78]
sub ebx, dword [esp + 0x80]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, esi
call fcn.004aba20
mov ecx, eax
call fcn.005311d0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x2c]
add edx, ecx
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x54]
mov dword [esp + 0x5c], edx
push ecx
mov edx, ecx
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x18]
push edx
mov ecx, esi
mov dword [esp + 0x68], eax
call fcn.004aba20
mov ecx, eax
call fcn.00531c20
test eax, eax
je 0x51fa74
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, ebp
call fcn.004aba20
mov ecx, eax
call fcn.005311d0
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
add edx, eax
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x20]
add edx, ecx
mov dword [esp + 0x68], ecx
lea ecx, [esp + 0x68]
mov dword [esp + 0x70], edx
push ecx
mov edx, ecx
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x18]
push edx
mov ecx, ebp
mov dword [esp + 0x7c], eax
call fcn.004aba20
mov ecx, eax
call fcn.00531c20
test eax, eax
je 0x51fa74
mov ecx, ebp
call fcn.0052eee0
mov dword [esp + 0xd8], eax
lea eax, [esp + 0xe0]
push eax
lea ecx, [esp + 0xe0]
push ecx
mov ecx, ebp
call fcn.0052eed0
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x5c]
sub ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x6c]
add edx, edi
mov dword [esp + 0xe4], edx
mov edx, dword [esp + 0x60]
sub edx, dword [esp + 0x58]
add eax, ebx
mov dword [esp + 0xec], ecx
mov ecx, ebp
mov dword [esp + 0xe8], eax
mov dword [esp + 0xf0], edx
call fcn.0052ef00
mov ecx, ebp
mov dword [esp + 0xd4], eax
call fcn.0052eef0
mov ecx, esi
mov dword [esp + 0xf4], eax
call fcn.0052eee0
mov dword [esp + 0x100], eax
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x108]
push ecx
mov ecx, esi
call fcn.0052eed0
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
sub edx, eax
mov dword [esp + 0x10c], eax
mov eax, dword [esp + 0x60]
sub eax, ecx
mov dword [esp + 0x110], ecx
mov ecx, esi
mov dword [esp + 0x114], edx
mov dword [esp + 0x118], eax
call fcn.0052ef00
mov ecx, esi
mov dword [esp + 0xfc], eax
call fcn.0052eef0
mov ecx, esi
mov dword [esp + 0x11c], eax
mov dword [esp + 0x12c], 1
mov dword [esp + 0x120], 0xff
call fcn.004aba20
mov ecx, eax
call fcn.00436a60
lea ecx, [esp + 0xd4]
push ecx
mov dword [esp + 0x148], eax
call fcn.00547510
add esp, 4
mov ecx, esi
call fcn.004aba20
push eax
mov ecx, ebp
call fcn.004aba20
mov ecx, eax
call fcn.00534550
cmp dword [esp + 0x1c], 0
je 0x51fa82
mov ecx, esi
call fcn.005305f0
mov dword [esp + 0x14], 0
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x34]
inc esi
add ebx, 4
cmp esi, dword [esp + 0x38]
mov dword [esp + 0x24], esi
mov dword [esp + 0x34], ebx
jl 0x51f670
lea ecx, [esp + 0x88]
mov dword [esp + 0x578], 0xffffffff
call fcn.0055a670
mov eax, ebp
mov ecx, dword [esp + 0x570]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x558]
xor ecx, esp
call fcn.0055d4e2
add esp, 0x568
ret 8