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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov edx, dword [esp + 0x70]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x74]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x78]
mov dword [esp + 0x38], edx
mov ebx, dword [esp + 0x7c]
mov edx, dword [esp + 0x80]
mov dword [esp + 0x28], edx
mov esi, dword [esp + 0x84]
mov ebp, dword [esp + 0x88]
cmp ebx, 8
je 0x515b50
cmp ebx, 0xf
jle 0x515b5c
mov edx, ebx
sar edx, 1
mov dword [esp + 0x2c], edx
add edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
add ecx, esi
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x28]
neg eax
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x2c]
shl ecx, 2
mov dword [esp + 0x40], ecx
mov eax, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x44]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
mov dword [esp + 0x24], edx
call fcn.004bdde0
mov edi, eax
mov ecx, dword [esp + 0x38]
add ecx, dword [esp + 0x40]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0xc], esi
mov ecx, dword [esp + 0x3c]
mov dword [esp + 8], ecx
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x4c]
mov dword [esp], ecx
call fcn.004bdde0
lea ecx, [edi + edi*2]
lea eax, [eax + ecx + 4]
cmp eax, 8
mov edx, dword [esp + 0x24]
jbe switch.0x00515ba0
xor eax, eax
mov dword [esp + 0x44], 0
cmp dword [esp + 0x2c], 8
je 0x515c68
lea edx, [ebp + ebx*8]
mov dword [esp + 0x3c], edx
test eax, eax
jne 0x515bd0
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov edx, dword [esp + 0x2c]
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0x40]
add eax, ebp
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
lea eax, [ebp + ebx*4]
mov dword [esp], eax
call fcn.00515900
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov edx, dword [esp + 0x2c]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.00515900
lea edx, [ebx*4]
mov edi, dword [esp + 0x30]
add edi, edx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x48]
mov dword [esp + 4], ecx
mov dword [esp], edi
mov dword [esp + 0x24], edx
call fcn.00515900
mov edx, dword [esp + 0x24]
lea esi, [ebp + edx]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov edx, dword [esp + 0x30]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.00519720
mov edi, eax
mov edx, dword [esp + 0x44]
test edx, edx
mov dword [esp + 0xc], ebx
je 0x515bb0
mov dword [esp + 8], esi
mov dword [esp + 4], ebp
mov dword [esp], esi
call fcn.005198d0
sub edi, eax
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x40]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.00519720
add edi, eax
je 0x515b95
add ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
lea edx, [ecx + ebx*4]
mov eax, dword [edx]
add eax, edi
mov dword [edx], eax
cmp edi, eax
jbe 0x515b95
lea esi, [esi]
add edx, 4
inc dword [edx]
jne 0x515b95
add edx, 4
inc dword [edx]
je 0x515b40
jmp 0x515b95
test edx, edx
jne 0x515b5c
test esi, esi
je 0x515eb0
lea eax, [ebx + esi]
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x38]
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0x28]
add eax, ebx
mov dword [esp + 8], eax
mov edx, dword [esp + 0x34]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.00515780
mov eax, dword [esp + 0x28]
add eax, esi
js 0x515e60
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
jmp dword [eax*4 + 0x5ffcec]
mov dword [esp + 8], ebp
mov dword [esp + 4], esi
mov dword [esp], esi
call fcn.00519720
add edi, eax
jmp 0x515b05
lea edx, [ebx*4]
lea edi, [ebp + edx]
cmp edx, 4
jae 0x515c20
test dl, 2
jne 0x515c00
and edx, 1
je 0x515a40
mov byte [edi], 0
jmp 0x515a40
mov word [edi], 0
add edi, 2
and edx, 1
je 0x515a40
jmp 0x515bee
test edi, 1
jne 0x515f3b
test edi, 2
jne 0x515f2b
mov ecx, edx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x515be0
mov eax, 1
mov dword [esp + 0x44], 0
cmp dword [esp + 0x2c], 8
jne 0x5159fa
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x5159fa
test esi, esi
jne 0x5159fa
lea edx, [ebx*4]
test eax, eax
jne 0x515ee0
mov eax, dword [esp + 0x40]
add eax, ebp
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
lea esi, [ebp + edx]
mov dword [esp], esi
mov dword [esp + 0x24], edx
call fcn.0055ec40
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov dword [esp + 8], ecx
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x30]
mov dword [esp], ecx
mov dword [esp + 0x24], edx
call fcn.0055ec40
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x30]
add edi, edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.0055ec40
jmp 0x515ac9
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.00519a80
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 4], edx
mov eax, dword [esp + 0x40]
add eax, ebp
mov dword [esp], eax
call fcn.00519a80
jmp case.default.0x515ba0
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.00519a80
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 4], edx
mov eax, dword [esp + 0x40]
add eax, ebp
mov dword [esp], eax
call fcn.00519a80
xor eax, eax
mov dword [esp + 0x44], 1
jmp 0x5159ef
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.00519a80
mov eax, esi
neg eax
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x4c]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x38]
jmp 0x515d3c
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.00519a80
mov eax, esi
neg eax
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x4c]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x38]
jmp 0x515d9c
neg eax
mov ecx, dword [esp + 0x28]
lea edx, [ecx + ebx*2]
add esi, edx
lea edx, [eax*4]
mov eax, dword [esp + 0x30]
lea edi, [eax + esi*4]
cmp edx, 4
jae 0x515ec0
test dl, 2
jne 0x515ea0
and edx, 1
je 0x515b95
mov byte [edi], 0
jmp 0x515b95
mov word [edi], 0
add edi, 2
jmp 0x515e83
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0055ec40
test edi, 1
jne 0x515f55
test edi, 2
jne 0x515f45
mov ecx, edx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x515e7e
lea esi, [ebp + edx]
mov edi, esi
mov dword [esp + 0x28], 0x40
test esi, 1
jne 0x515f6e
test edi, 2
jne 0x515f5f
mov ecx, dword [esp + 0x28]
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
test byte [esp + 0x28], 2
je 0x515f18
mov word [edi], 0
add edi, 2
test byte [esp + 0x28], 1
je 0x515cad
mov byte [edi], 0
jmp 0x515cad
mov word [edi], 0
add edi, 2
sub edx, 2
jmp 0x515c38
mov byte [edi], 0
inc edi
dec edx
jmp 0x515c2c
mov word [edi], 0
add edi, 2
sub edx, 2
jmp 0x515ed4
mov byte [edi], 0
inc edi
dec edx
jmp 0x515ecc
mov word [edi], 0
add edi, 2
sub dword [esp + 0x28], 2
jmp 0x515efe
mov byte [esi], 0
lea edi, [esi + 1]
mov dword [esp + 0x28], 0x3f
jmp 0x515ef6