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

Disassembly:
sub esp, 0x8c
push ebx
push esi
mov esi, dword [esp + 0xa0]
push edi
mov edi, dword [esp + 0x9c]
mov ebx, dword [edi + 8]
xor edx, edx
mov dword [esp + 0x28], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
cmp ebx, edx
jne 0x5168ac
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x8c
ret
push ebp
mov ebp, dword [esp + 0xa4]
mov ecx, 0x6e
cmp ebp, edx
je 0x5168c1
movzx ecx, byte [ebp]
lea eax, [ecx - 0x13]
mov dword [esp + 0x10], ecx
cmp eax, 0x96
ja case.0x5168da.21
movzx eax, byte [eax + 0x51762c]
jmp dword [eax*4 + 0x5175b4]
mov ebp, dword [ebp + 0xc]
jmp 0x5168b4
movsx ecx, word [ebp + 0x22]
mov eax, dword [ebp + 0x28]
cmp byte [eax], 0
mov edx, dword [eax + 0x1c]
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*8]
jne 0x516909
mov eax, dword [ecx + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
cmp byte [eax + 1], 0
je 0x516930
mov ecx, dword [ecx + 0xc]
mov edx, dword [eax + 8]
push esi
push ecx
push edx
push 0x5a
push ebx
call fcn.004c5570
add esp, 0x14
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
xor edx, edx
test byte [ebp + 4], 8
mov ecx, dword [ebp + 0x1c]
je 0x5169ab
mov eax, dword [ebp + 0xc]
push esi
push eax
push edi
call fcn.00516870
mov ecx, dword [ebp + 0x2c]
mov edi, eax
movsx eax, word [ebp + 0x20]
add esp, 0xc
mov dword [esp + 0x1c], edi
call fcn.004b5ee0
movsx ebp, al
cmp ebp, 0x41
je 0x51699e
cmp edi, esi
je 0x51697a
push 0
push esi
push edi
push 0x4f
push ebx
call fcn.004c5570
add esp, 0x14
mov dword [esp + 0x1c], esi
mov edx, dword [esp + 0x1c]
push 0xffffffffffffffff
lea ecx, [ebp*2 + 0x5ebda0]
push ecx
push edx
xor eax, eax
push 0x5b
lea ecx, [eax + 1]
mov edi, ebx
call fcn.004c5660
mov edi, dword [esp + 0x2c]
add esp, 0x10
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
cmp ecx, edx
jge 0x5169ca
mov edi, dword [edi + 0x38]
cmp edi, edx
jge 0x5169c7
movsx eax, word [ebp + 0x20]
pop ebp
sub eax, edi
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
lea ecx, [edi - 1]
movzx eax, byte [ebp + 0x26]
movsx edx, word [ebp + 0x20]
push eax
mov eax, dword [ebp + 0x2c]
push edx
push eax
mov eax, dword [esp + 0xac]
mov edi, esi
call fcn.004ee670
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
push esi
push 0
push edi
mov eax, ebp
call fcn.004d6800
add esp, 0xc
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
mov ecx, dword [ebp + 8]
xor edx, edx
cmp byte [ecx + 4], dl
push 0
sete dl
push esi
push edx
push 0x46
push ebx
call fcn.004c5570
add esp, 0x14
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
mov edx, dword [ebp + 8]
mov edi, esi
push edi
push 0
mov esi, ebx
call fcn.004c7220
add esp, 8
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, dword [ebp + 8]
mov edi, esi
push eax
mov eax, edi
mov esi, ebx
call fcn.004cbc30
add esp, 4
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
push 0
push esi
push 0
push 0x49
push ebx
call fcn.004c5570
add esp, 0x14
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
mov edi, dword [ebp + 8]
add edi, 2
mov eax, edi
call fcn.004acea0
mov ebp, eax
mov eax, dword [ebx]
dec ebp
push ebp
push eax
call fcn.004bc500
push 0xfffffffffffffff9
push eax
mov eax, ebp
cdq
sub eax, edx
sar eax, 1
push eax
push 0x4b
xor eax, eax
mov ecx, esi
mov edi, ebx
call fcn.004c5660
add esp, 0x18
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
movsx ecx, word [ebp + 0x20]
push 0
push esi
push ecx
push 0x4c
push ebx
call fcn.004c5570
mov edx, dword [ebp + 8]
add esp, 0x14
cmp byte [edx + 1], 0
je 0x516b18
movsx esi, word [ebp + 0x20]
mov eax, edi
mov ecx, dword [eax + 0xd4]
call fcn.004ade80
push 0xffffffffffffffff
mov edx, ebx
mov dword [ecx], 0
call fcn.004c0060
mov esi, dword [esp + 0xac]
add esp, 4
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, dword [ebp + 0x1c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov ecx, dword [ebp + 0xc]
push esi
push ecx
push edi
call fcn.00516870
add esp, 0xc
mov dword [esp + 0x2c], eax
cmp eax, esi
je 0x516b5c
push 0
push esi
push eax
push 0x4f
push ebx
call fcn.004c5570
add esp, 0x14
mov dword [esp + 0x2c], esi
mov edx, dword [ebp + 8]
xor edi, edi
call fcn.004c2020
movsx eax, al
push edi
push eax
push esi
push 0x55
push ebx
call fcn.004c5570
mov eax, dword [esp + 0x40]
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
xor edx, edx
cmp ecx, 0x2d
sete dl
mov dword [esp + 0x20], 0x80
add edx, 0x34
mov dword [esp + 0x10], edx
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
call fcn.004c13d0
test eax, eax
je 0x516bd0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
push eax
push ecx
push esi
push edi
mov eax, ebp
call fcn.005129e0
mov eax, dword [esp + 0x3c]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
lea edx, [esp + 0x18]
push edx
mov eax, ebx
mov esi, edi
call fcn.004ee770
mov edi, eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [ebp + 0x10]
call fcn.004ee770
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
or ecx, 0x20
push ecx
mov ecx, dword [esp + 0xb4]
push ecx
push eax
mov eax, dword [ebp + 0x10]
push edi
push edx
push esi
mov ecx, ebx
call fcn.004ee1d0
add esp, 0x20
jmp 0x516c4a
lea eax, [esp + 0x18]
push eax
mov eax, dword [ebp + 0xc]
mov esi, edi
call fcn.004ee770
lea ecx, [esp + 0x20]
mov edi, eax
mov eax, dword [ebp + 0x10]
push ecx
call fcn.004ee770
mov edx, dword [esp + 0xb0]
push edx
push edi
push eax
mov eax, dword [esp + 0x24]
push eax
push ebx
call fcn.004c5570
add esp, 0x1c
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x516c66
mov al, byte [esi + 0x13]
cmp al, 8
jae 0x516c66
movzx eax, al
mov dword [esi + eax*4 + 0x90], ecx
inc byte [esi + 0x13]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x516c82
mov al, byte [esi + 0x13]
cmp al, 8
jae 0x516c82
movzx edx, al
mov dword [esi + edx*4 + 0x90], ecx
inc byte [esi + 0x13]
mov eax, dword [esp + 0x2c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, dword [ebp + 0xc]
mov cl, byte [eax]
cmp cl, 0x8f
jne 0x516cb4
push esi
push 1
push edi
call fcn.004d6800
add esp, 0xc
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
cmp cl, 0x8d
jne 0x516cd8
mov edx, dword [eax + 8]
mov edi, esi
push edi
push 1
mov esi, ebx
call fcn.004c7220
add esp, 8
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
lea ecx, [esp + 0x18]
push ecx
lea eax, [esp + 0x38]
mov esi, edi
mov byte [esp + 0x38], 0x8f
mov dword [esp + 0x3c], 0x4400
mov dword [esp + 0x40], edx
call fcn.004ee770
lea edx, [esp + 0x20]
mov edi, eax
mov eax, dword [ebp + 0xc]
push edx
call fcn.004ee770
mov ecx, dword [esp + 0xb0]
push ecx
push edi
push eax
push 0x61
jmp 0x516c41
mov eax, dword [ebp + 0xc]
lea edx, [esp + 0x18]
push edx
mov esi, edi
call fcn.004ee770
mov ecx, eax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0xb0]
push ebx
call fcn.004c5620
add esp, 0xc
jmp 0x516c4a
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x18]
push ecx
mov esi, edi
call fcn.004ee770
mov edx, dword [ebp + 0x10]
mov esi, eax
mov eax, dword [edx + 8]
xor ecx, ecx
cmp byte [eax + 4], cl
sete cl
xor edx, edx
cmp byte [ebp + 0x26], 0x2d
sete dl
xor eax, eax
xor edx, ecx
test ecx, ecx
mov ecx, dword [esp + 0xac]
push edx
sete al
push esi
push 0x58
mov esi, ebx
call fcn.004c57a0
add esp, 0x10
mov esi, edi
jmp 0x516c4a
push 0
mov edi, esi
push edi
push 1
push 0x46
push ebx
call fcn.004c5570
mov esi, dword [esp + 0xb4]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ebp + 0xc]
call fcn.004ee770
mov ecx, dword [esp + 0x28]
push 0
push 0
push eax
push ecx
push ebx
call fcn.004c5570
push 0
push edi
push 0
push 0x46
push ebx
mov esi, eax
call fcn.004c5570
add esp, 0x40
mov eax, esi
mov edx, ebx
call fcn.004bfd80
mov esi, dword [esp + 0xa0]
jmp 0x516c4a
mov eax, dword [ebp + 0x28]
cmp eax, edx
jne 0x516e14
mov edx, dword [ebp + 8]
push edx
push str.misuse_of_aggregate:__s__
mov esi, edi
call fcn.004d3340
mov eax, dword [esp + 0x34]
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
movsx ecx, word [ebp + 0x22]
mov edx, dword [eax + 0x28]
pop ebp
pop edi
shl ecx, 4
mov eax, dword [ecx + edx + 8]
pop esi
pop ebx
add esp, 0x8c
ret
test dword [ebp + 4], 0x6000
mov eax, dword [edi]
mov dword [esp + 0x1c], eax
mov al, byte [eax + 0x46]
mov dword [esp + 0x20], edx
mov byte [esp + 0x14], al
mov dword [esp + 0x30], edx
jne 0x516e60
mov eax, dword [ebp + 0x30]
cmp eax, edx
je 0x516e60
mov eax, dword [eax + 0x2c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
cmp byte [edi + 0x17], dl
je 0x516e89
mov eax, ebp
call fcn.004c17b0
test eax, eax
je 0x516e87
push 0xffffffffffffffff
push ebp
push edi
call fcn.004ee6b0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
xor edx, edx
test dword [ebp + 4], 0x4000
je 0x516f52
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 8]
push 0
push edx
mov edx, dword [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x34], eax
call fcn.004ccd60
add esp, 0x10
mov dword [esp + 0x28], eax
test eax, eax
je 0x51716d
cmp dword [eax + 0x14], 0
jne 0x51716d
mov eax, dword [eax + 4]
test eax, 0x200
je 0x516f6c
mov eax, ebx
call fcn.004c5810
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 4]
push esi
push eax
push edi
call fcn.005176d0
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, 1
jle 0x516f38
add ebp, 0x1c
dec eax
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x24]
push 0
push ecx
push esi
push 0x33
push ebx
call fcn.004c5570
mov edx, dword [ebp]
push esi
push edx
push edi
call fcn.005176d0
add esp, 0x20
add ebp, 0x18
sub dword [esp + 0x14], 1
jne 0x516f10
mov edx, dword [esp + 0x24]
mov ecx, ebx
call fcn.004b3740
mov eax, dword [esp + 0x2c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
cmp eax, edx
je 0x516e9a
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
jmp 0x516e9e
test eax, 0x400
je 0x516f90
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 4]
push esi
push ecx
push edi
call fcn.00516870
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], 0
mov dword [esp + 0x14], 1
test ecx, ecx
jle 0x517019
mov edx, dword [esp + 0x18]
add edx, 4
mov dword [esp + 0x2c], edx
cmp dword [esp + 0x24], 0x20
jge 0x516fd5
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
call fcn.004c1760
test eax, eax
je 0x516fd1
mov ecx, dword [esp + 0x14]
or dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
test byte [edx + 4], 0x20
je 0x516ffd
cmp dword [esp + 0x30], 0
jne 0x516ffd
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
push edi
call fcn.004edfc0
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
add dword [esp + 0x2c], 0x18
inc eax
rol edx, 1
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], edx
jl 0x516fb3
cmp dword [esp + 0x18], 0
je 0x51708a
cmp dword [esp + 0x20], 0
je 0x517034
mov edx, dword [edi + 0x2c]
lea eax, [edx + 1]
add edx, ecx
mov dword [edi + 0x2c], edx
jmp 0x517044
mov esi, ecx
mov ecx, edi
call fcn.004b68d0
mov esi, dword [esp + 0xa8]
mov ecx, dword [esp + 0x28]
test byte [ecx + 4], 0xc0
mov dword [esp + 0x14], eax
je 0x517072
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 4]
mov dl, byte [ecx]
cmp dl, 0x9e
je 0x517065
cmp dl, 0xa0
jne 0x517072
mov edx, dword [esp + 0x28]
mov dl, byte [edx + 4]
and dl, 0xc0
mov byte [ecx + 0x26], dl
push 3
push 0
push eax
mov eax, dword [esp + 0x24]
push edi
call fcn.004ee8a0
mov ecx, dword [esp + 0x20]
add esp, 0x10
jmp 0x517092
mov dword [esp + 0x14], 0
cmp ecx, 2
jl 0x5170ac
test byte [ebp + 4], 0x80
je 0x5170ac
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x1c]
push eax
mov eax, dword [ecx + 0x1c]
jmp 0x5170bd
test ecx, ecx
jle 0x5170cd
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 4]
push ecx
push edx
mov ecx, dword [esp + 0x24]
call fcn.004cd920
mov dword [esp + 0x30], eax
add esp, 8
mov ecx, dword [esp + 0x28]
test byte [ecx + 4], 0x20
je 0x517102
cmp dword [esp + 0x30], 0
jne 0x5170e9
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 8]
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x30]
push 0xfffffffffffffffe
push ecx
push 0
push 0x52
xor eax, eax
xor ecx, ecx
mov edi, ebx
call fcn.004c5660
add esp, 0x10
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0xa0]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x14]
push 0xfffffffffffffff8
push edx
mov edx, dword [ecx + 0x38]
neg edx
sbb edx, edx
push eax
add edx, 0x3f
push edx
mov eax, esi
mov ecx, ebp
mov edi, ebx
call fcn.004c5660
movzx dx, byte [esp + 0x20]
add esp, 0x10
mov ecx, ebx
call fcn.004b3790
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x517160
cmp dword [esp + 0x20], 0
jne 0x517160
mov eax, dword [esp + 0xa0]
push eax
mov edx, ebp
call fcn.004b6920
add esp, 4
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
mov ecx, dword [esp + 0x24]
push ecx
push str.unknown_function:__s__
mov esi, edi
call fcn.004d3340
mov eax, dword [esp + 0x34]
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
cmp ecx, 0x7f
jne 0x5171c2
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov eax, dword [eax]
cmp eax, 1
je 0x5171c2
push 1
push eax
push str.sub_select_returns__d_columns___expected__d
mov esi, edi
call fcn.004d3340
mov eax, dword [esp + 0x38]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
push 0
push 0
push ebp
push edi
call fcn.0050fdc0
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x1c], edx
jne 0x5171f9
push 0
push 0
push eax
push edi
call fcn.0050fdc0
mov ecx, dword [ebp + 0xc]
add esp, 0x10
mov dword [ecx + 0x1c], eax
xor edx, edx
mov esi, dword [ebp + 0x1c]
cmp esi, edx
je 0x51721d
mov ecx, dword [ebp + 0xc]
call fcn.004b5f30
cmp esi, eax
je 0x51721d
push eax
push esi
push str._d_columns_assigned__d_values
mov esi, edi
call fcn.004d3340
add esp, 0xc
movsx eax, word [ebp + 0x20]
mov edx, dword [ebp + 0xc]
add eax, dword [edx + 0x1c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, ebx
call fcn.004c5810
mov dword [esp + 0x14], eax
mov eax, ebx
call fcn.004c5810
push 0
push esi
push 0
push 0x49
push ebx
mov dword [esp + 0x38], eax
call fcn.004c5570
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
push eax
push ecx
push ebp
push edi
call fcn.00512dd0
push 0
push esi
push 1
push 0x46
push ebx
call fcn.004c5570
mov edx, dword [esp + 0x4c]
mov ecx, ebx
call fcn.004b3740
push 0
push 0
push esi
push 0x53
push ebx
call fcn.004c5570
mov edx, dword [esp + 0x70]
add esp, 0x4c
mov ecx, ebx
call fcn.004b3740
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
push 0
push 0
push esi
push ebp
push edi
call fcn.005104e0
add esp, 0x14
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x8c
ret
mov edi, dword [ebp + 0x2c]
movsx edx, word [edi + 0x2a]
movsx eax, word [ebp + 0x20]
inc edx
imul edx, dword [ebp + 0x1c]
push 0
push esi
lea ecx, [edx + eax + 1]
push ecx
push 0x96
push ebx
call fcn.004c5570
movzx eax, word [ebp + 0x20]
add esp, 0x14
test ax, ax
jl 0x516c82
movsx edx, ax
mov eax, dword [edi + 4]
shl edx, 4
cmp byte [edx + eax + 0xd], 0x45
jne 0x516c82
push 0
push 0
mov ecx, esi
push ecx
push 0x54
push ebx
call fcn.004c5570
mov eax, dword [esp + 0x40]
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
push str.row_value_misused
mov esi, edi
call fcn.004d3340
mov eax, dword [esp + 0x30]
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, dword [ebp + 0x1c]
push 0
push 0
push eax
push 0x15
push ebx
call fcn.004c5570
mov edx, dword [ebp + 0xc]
push esi
push edx
push edi
mov dword [esp + 0x34], eax
call fcn.00516870
mov esi, dword [esp + 0x34]
mov edi, eax
mov eax, esi
mov edx, ebx
mov dword [esp + 0x4c], edi
call fcn.004bfd80
push ebx
mov edx, edi
mov eax, esi
call fcn.004bfd50
add esp, 0x24
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
cmp dword [edi + 0x78], edx
jne 0x5173b5
push str.RAISE___may_only_be_used_within_a_trigger_program
mov esi, edi
call fcn.004d3340
add esp, 4
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x8c
ret
cmp byte [ebp + 1], 2
jne 0x5173c2
mov ecx, edi
call fcn.004b7730
mov al, byte [ebp + 1]
push 0
cmp al, 4
jne 0x5173f1
mov eax, dword [ebp + 8]
push eax
xor eax, eax
push 0
push 0x45
lea ecx, [eax + 4]
mov edi, ebx
call fcn.004c5660
mov eax, dword [esp + 0x3c]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov ecx, dword [ebp + 8]
push 0
movsx edx, al
push ecx
push edx
push 0x713
call fcn.004d0480
mov eax, dword [esp + 0x40]
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x8c
ret
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [eax]
mov dword [esp + 0x30], eax
mov eax, ebx
mov dword [esp + 0x14], edx
call fcn.004c5810
mov ebp, dword [ebp + 0xc]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebp
test ebp, ebp
je 0x5174ad
mov eax, dword [esp + 0xa0]
mov ecx, 0xd
mov esi, ebp
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x1c]
call fcn.00510410
mov dl, byte [esp + 0x38]
and dword [esp + 0x3c], 0xffffefff
push 0x34
mov dword [esp + 0x58], eax
lea eax, [esp + 0x70]
push 0
push eax
mov byte [esp + 0x6a], dl
mov byte [esp + 0x44], 0xa4
call fcn.00585e50
mov esi, dword [esp + 0xb8]
mov edi, dword [esp + 0xb0]
lea ecx, [esp + 0x44]
lea edx, [esp + 0x78]
add esp, 0x10
mov byte [esp + 0x68], 0x35
mov dword [esp + 0x74], ecx
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x30]
lea eax, [ecx - 1]
test eax, eax
jle 0x517552
mov ecx, dword [esp + 0x10]
dec eax
add ecx, 4
shr eax, 1
inc eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
nop
cmp dword [esp + 0x24], 0
je 0x5174e3
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov dword [esp + 0x78], ecx
jmp 0x5174ed
mov edx, dword [esp + 0x20]
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov eax, ebx
call fcn.004c5810
mov ecx, dword [esp + 0x14]
push 0x10
mov ebp, eax
push ebp
push ecx
push edi
call fcn.005140e0
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x18]
push esi
push eax
push edi
call fcn.005176d0
mov ecx, dword [esp + 0x44]
push 0
push ecx
push 0
push 0xb
push ebx
call fcn.004c5570
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x40]
add esp, 0x30
test eax, eax
je 0x517542
mov ecx, dword [ebx + 0x88]
lea edx, [ebp*4 + 4]
sub eax, edx
mov dword [eax], ecx
add dword [esp + 0x20], 0x30
sub dword [esp + 0x1c], 1
jne 0x5174d0
mov ecx, dword [esp + 0x30]
test cl, 1
je 0x51756f
mov eax, dword [esp + 0x10]
lea edx, [ecx + ecx*2]
mov ecx, dword [eax + edx*8 - 0x14]
push esi
push ecx
push edi
call fcn.005176d0
add esp, 0xc
jmp 0x51757f
push 0
push esi
push 0
push 0x49
push ebx
call fcn.004c5570
add esp, 0x14
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x40]
test eax, eax
je 0x516c82
mov edx, dword [esp + 0x28]
pop ebp
lea ecx, [edx*4 + 4]
mov edx, dword [ebx + 0x88]
pop edi
sub eax, ecx
pop esi
mov dword [eax], edx
mov eax, dword [esp + 0x20]
pop ebx
add esp, 0x8c
ret