Function at 0x51f0e0
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc4
push ebx
mov ebx, dword [esp + 0xd0]
push ebp
push esi
mov esi, dword [esp + 0xd4]
push edi
test ebx, ebx
mov eax, dword [esi]
mov dword [esp + 0x14], 1
mov dword [esp + 0x24], eax
je 0x51f383
mov cl, byte [eax + 0x1e]
test cl, cl
jne 0x51f383
mov eax, dword [esi + 0x40]
test eax, eax
jne 0x51f383
push 0
push 0
push 0
push 0x15
push esi
call fcn.00515430
add esp, 0x14
test eax, eax
jne 0x51f383
mov ecx, 0xb
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x18]
mov ecx, dword [esp + 0xe0]
mov dword [esp + 0x18], eax
cmp byte [ecx], 4
ja 0x51f168
and word [ebx + 6], 0xfffe
mov dword [ebx + 0x18], 0
push 0
push ebx
push esi
call fcn.0051e520
mov ecx, dword [esi + 0x40]
mov edx, dword [ebx + 8]
mov eax, dword [ebx]
add esp, 0xc
test ecx, ecx
mov dword [esp + 0x28], edx
jne 0x51fd58
mov ecx, dword [esp + 0x24]
mov dl, byte [ecx + 0x1e]
test dl, dl
jne 0x51fd58
mov cl, byte [ebx + 6]
mov edx, dword [esp + 0x18]
shr ecx, 2
and ecx, 1
mov dword [ebx + 0x18], edx
test eax, eax
mov dword [esp + 0x1c], ecx
je 0x51fd58
mov eax, dword [esi + 0x40]
test eax, eax
jg 0x51fd58
mov edx, dword [esp + 0xe0]
cmp byte [edx], 4
ja 0x51f1d2
mov dword [esp + 0x18], 0
push esi
call fcn.0051e480
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x51fd58
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x20], 0
test eax, eax
jne 0x51f31f
mov eax, dword [esp + 0x28]
movsx ecx, word [eax]
mov eax, dword [esp + 0x20]
cmp eax, ecx
jge 0x51f31f
lea edx, [eax*8]
sub edx, eax
mov eax, dword [esp + 0x28]
mov edi, dword [eax + edx*8 + 0x18]
lea eax, [eax + edx*8 + 8]
test edi, edi
mov dword [esp + 0x44], eax
je 0x51f30b
mov cl, byte [eax + 0x14]
test cl, cl
jne 0x51f30b
push ebx
call fcn.0051fd90
mov edx, dword [esi + 0x1b0]
mov ecx, dword [esp + 0x20]
add edx, eax
mov dword [esi + 0x1b0], edx
mov al, byte [edi + 6]
mov edx, dword [esp + 0x24]
shr eax, 2
and eax, 1
push eax
push ecx
push edx
push ebx
push esi
mov dword [esp + 0x70], eax
call fcn.00522050
add esp, 0x18
test eax, eax
je 0x51f28f
mov eax, dword [esp + 0x58]
test eax, eax
je 0x51f285
or byte [ebx + 6], 4
mov dword [esp + 0x1c], 1
mov dword [esp + 0x20], 0xffffffff
jmp 0x51f2c0
mov eax, dword [esp + 0x44]
lea edx, [esp + 0xc4]
mov ecx, dword [eax + 0x18]
push ecx
push 9
push edx
call fcn.0051dd00
lea eax, [esp + 0xd0]
push eax
push edi
push esi
call fcn.0051f0e0
mov ecx, dword [esp + 0x5c]
add esp, 0x18
mov byte [ecx + 0x14], 1
mov eax, dword [esi + 0x40]
test eax, eax
jne 0x51fd58
mov edx, dword [esp + 0x24]
mov al, byte [edx + 0x1e]
test al, al
jne 0x51fd58
push ebx
call fcn.0051fd90
mov ecx, dword [esi + 0x1b0]
add esp, 4
sub ecx, eax
mov dword [esi + 0x1b0], ecx
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0xe0]
mov dword [esp + 0x28], eax
cmp byte [ecx], 4
jbe 0x51f30b
mov edx, dword [ebx + 0x18]
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x20]
mov eax, dword [ebx + 0x1c]
inc ecx
test eax, eax
mov dword [esp + 0x20], ecx
je 0x51f1f8
mov eax, dword [ebx]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x34], ecx
mov cl, byte [ebx + 6]
mov dword [esp + 0x44], eax
mov eax, dword [ebx + 0x1c]
and ecx, 1
test eax, eax
mov dword [esp + 0x10], edx
mov edi, ecx
je 0x51f3b0
mov eax, dword [ebx + 0x24]
test eax, eax
jne 0x51f393
xor ecx, ecx
xor edx, edx
mov eax, ebx
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], ebx
mov ecx, eax
mov eax, dword [eax + 0x1c]
inc edx
test eax, eax
jne 0x51f356
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x60]
test eax, eax
je 0x51f393
cmp edx, eax
jle 0x51f393
push str.too_many_terms_in_compound_SELECT
push esi
call fcn.00506650
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc4
ret
mov ecx, dword [esp + 0xe0]
push ecx
push ebx
push esi
call fcn.00520d90
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc4
ret
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0xe0]
mov eax, dword [edx]
push eax
push ecx
push esi
call fcn.00520170
add esp, 0xc
test eax, eax
jne 0x51fd58
mov dl, byte [ebx + 6]
and dl, 5
cmp dl, 1
jne 0x51f401
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x51f401
mov eax, dword [ebx]
mov ecx, dword [esp + 0x24]
push eax
push ecx
call fcn.00514c20
and word [ebx + 6], 0xfffe
add esp, 8
mov dword [ebx + 0x10], eax
mov dword [esp + 0x10], eax
xor edi, edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x51f448
push eax
push esi
call fcn.00520730
mov ecx, dword [esp + 0x20]
mov edx, dword [esi + 0x44]
push 0xfffffffffffffff0
push eax
mov dword [ecx + 8], edx
mov ecx, dword [esi + 0x44]
mov eax, dword [esp + 0x28]
inc ecx
mov dword [esi + 0x44], ecx
push 0
mov edx, dword [eax]
mov eax, dword [eax + 8]
add edx, 2
push edx
push eax
push 0x74
push ebp
call fcn.0050fb10
add esp, 0x24
mov dword [esp + 0x30], eax
mov dword [ebx + 0x40], eax
jmp 0x51f450
mov dword [esp + 0x30], 0xffffffff
mov ecx, dword [esp + 0xe0]
cmp byte [ecx], 9
jne 0x51f472
mov edx, dword [esp + 0x48]
mov eax, dword [edx]
mov edx, dword [ecx + 4]
push eax
push edx
push 0x74
push ebp
call fcn.005107e0
add esp, 0x10
push ebp
call fcn.00510c10
push eax
push ebx
push esi
mov dword [esp + 0xa8], eax
call fcn.00520c80
add esp, 0x10
test edi, edi
je 0x51f4b9
mov edi, dword [esi + 0x44]
mov dword [esp + 0x58], edi
lea eax, [edi + 1]
mov dword [esi + 0x44], eax
mov ecx, dword [ebx]
push ecx
push esi
call fcn.00520730
push 0xfffffffffffffff0
push eax
push 0
push 0
push edi
push 0x74
push ebp
call fcn.0050fb10
add esp, 0x24
jmp 0x51f4c1
mov dword [esp + 0x58], 0xffffffff
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
test eax, eax
jne 0x51f559
test edx, edx
jne 0x51f55d
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
push edx
push edx
lea edx, [esp + 0x20]
push edx
push eax
push ecx
push esi
call fcn.005251c0
mov edi, eax
add esp, 0x18
test edi, edi
je 0x51fd58
mov eax, dword [esp + 0x30]
test eax, eax
jl 0x51f524
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x51f524
mov edx, dword [esp + 0x30]
push 1
push edx
push ebp
call fcn.005069f0
add esp, 0xc
mov dword [ebx + 0x40], 0xffffffff
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x14]
mov edx, dword [esp + 0xe0]
push eax
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push 0xffffffffffffffff
push eax
push 0
push 0
push ecx
push ebx
push esi
call fcn.005201b0
push edi
call fcn.00528cd0
add esp, 0x2c
jmp 0x51fcfe
test edx, edx
je 0x51f591
mov eax, dword [ebx]
mov ecx, dword [eax]
mov eax, dword [eax + 0xc]
test ecx, ecx
jle 0x51f57a
add eax, 0xc
mov word [eax], 0
add eax, 0x10
dec ecx
jne 0x51f56b
mov edx, dword [esp + 0x10]
mov ecx, dword [edx]
mov edx, dword [edx + 0xc]
test ecx, ecx
jle 0x51f591
lea eax, [edx + 0xc]
mov word [eax], 0
add eax, 0x10
dec ecx
jne 0x51f586
push ebp
call fcn.00510c10
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x2c]
mov ecx, 9
xor eax, eax
lea edi, [esp + 0xa4]
add esp, 4
rep stosd dword es:[edi], eax
lea eax, [esp + 0x64]
mov dword [esp + 0xa0], esi
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0xa4], edx
je 0x51f5dc
mov ecx, dword [eax]
inc ecx
mov dword [esp + 0x70], ecx
jmp 0x51f5e4
mov dword [esp + 0x70], 0
mov edx, dword [esp + 0x48]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0xa0]
push edx
push eax
call fcn.00520130
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0xa8]
push ecx
push edx
call fcn.00520130
mov eax, dword [esp + 0x54]
xor edi, edi
add esp, 0x10
cmp eax, edi
je 0x51f62a
push eax
lea eax, [esp + 0xa4]
push eax
call fcn.0051fe10
add esp, 8
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x78]
cmp eax, edi
mov dword [esp + 0x80], ecx
mov dword [esp + 0x20], edi
jle 0x51f679
mov edx, dword [esp + 0x84]
mov eax, dword [edi + edx]
lea edx, [esp + 0xa0]
mov ecx, dword [eax + 0x10]
push ecx
push edx
call fcn.00520130
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x90]
add esp, 8
inc eax
add edi, 0x10
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x51f644
mov eax, dword [esp + 0x24]
mov cl, byte [eax + 0x1e]
test cl, cl
jne 0x51fd58
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, eax
je 0x51fbb3
mov eax, dword [esi + 0x44]
push ecx
mov dword [esp + 0x6c], eax
inc eax
push esi
mov dword [esi + 0x44], eax
call fcn.00520730
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x70]
push 0xfffffffffffffff0
push eax
push 0
push ecx
push edx
push 0x74
push ebp
mov dword [esp + 0xc0], eax
call fcn.0050fb10
mov dword [esp + 0x84], eax
mov eax, dword [esi + 0x48]
inc eax
push ebp
mov dword [esp + 0x84], eax
lea edi, [eax + 1]
mov dword [esp + 0x44], edi
lea eax, [edi + 1]
mov dword [esi + 0x48], eax
call fcn.00510c10
mov dword [esp + 0x7c], eax
mov eax, dword [esi + 0x48]
inc eax
push ebp
mov dword [esi + 0x48], eax
mov dword [esp + 0x68], eax
call fcn.00510c10
mov dword [esp + 0x6c], eax
mov eax, dword [esi + 0x48]
push edi
push 0
lea ecx, [eax + 1]
push 0x31
mov dword [esp + 0xcc], ecx
mov ecx, dword [esp + 0x48]
push ebp
mov edx, dword [ecx]
add eax, edx
mov dword [esi + 0x48], eax
mov ecx, dword [ecx]
lea edx, [eax + 1]
add ecx, eax
mov dword [esp + 0x6c], edx
mov dword [esi + 0x48], ecx
call fcn.005107e0
mov edx, dword [esp + 0x98]
push edx
push 0
push 0x31
push ebp
call fcn.005107e0
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
add esp, 0x4c
push eax
push ecx
push 0x30
push ebp
call fcn.005107e0
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x38]
push 0
lea edx, [esp + 0x24]
push 0
push edx
push eax
push ecx
push esi
call fcn.005251c0
add esp, 0x28
mov dword [esp + 0x90], eax
test eax, eax
je 0x51fd58
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x51f7a5
mov edx, dword [ebx + 0x10]
mov dword [esp + 0x34], eax
mov dword [esp + 0x10], edx
jmp 0x51f931
mov edi, dword [eax]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x38], edi
inc edi
mov eax, edi
mov dword [esp + 0x34], 1
test ecx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x2c], edi
jle 0x51f7f5
mov edx, dword [esp + 0x74]
mov dword [esp + 0x14], ecx
add edx, 0xc
mov ecx, dword [edx]
cmp ecx, dword [esp + 0x2c]
jl 0x51f7e3
mov ecx, dword [esp + 0x2c]
inc eax
inc ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x14]
add edx, 0x18
dec ecx
mov dword [esp + 0x14], ecx
jne 0x51f7d1
mov dword [esp + 0x14], eax
push eax
push esi
call fcn.005136b0
mov edx, dword [esp + 0x18]
push 0
push eax
push edx
push esi
mov dword [esp + 0x64], eax
call fcn.00512ec0
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x80]
add eax, ecx
push eax
push edx
push 6
push ebp
call fcn.005107e0
mov eax, dword [esp + 0xa0]
add esp, 0x28
test eax, eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], 0
jle 0x51f8be
mov eax, dword [esp + 0x4c]
mov ecx, edi
add eax, ecx
xor edi, edi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x2c]
mov ecx, dword [edi + eax + 0xc]
cmp ecx, edx
jl 0x51f8aa
mov ecx, dword [esp + 0x38]
mov edx, dword [edi + eax + 4]
push 0
push ecx
mov ecx, dword [edi + eax + 8]
push edx
mov edx, dword [edi + eax]
push ecx
push edx
push esi
call fcn.00512c30
mov ecx, dword [esp + 0x50]
add esp, 0x18
cmp ecx, eax
je 0x51f894
push ecx
push eax
push 9
push ebp
call fcn.005107e0
add esp, 0x10
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
inc ecx
inc eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x78]
inc ecx
add edi, 0x18
cmp ecx, edx
mov dword [esp + 0x20], ecx
jl 0x51f855
push esi
call fcn.00513590
mov edx, dword [esp + 0x18]
mov edi, eax
mov eax, dword [esp + 0x50]
push edi
push edx
push eax
push 0x5a
push ebp
call fcn.0050fb50
mov ecx, dword [esp + 0x80]
push edi
push ecx
push 0x6c
push ebp
call fcn.005107e0
push edi
push esi
call fcn.005135c0
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x7c]
push edx
push eax
push esi
call fcn.00513700
mov ecx, dword [esp + 0xcc]
push ecx
call fcn.00528cd0
mov edx, dword [esp + 0x90]
mov eax, dword [esp + 0xa8]
add esp, 0x40
push edx
push eax
push 0x14
push ebp
call fcn.005107e0
add esp, 0x10
mov byte [esp + 0x65], 1
push ebp
call fcn.00510c90
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x14]
add esp, 4
xor edi, edi
cmp dword [eax], 0
jle 0x51f9a7
mov dword [esp + 0x14], edi
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x51f970
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x68]
lea edx, [edi + ecx]
push edx
push edi
push eax
push 3
push ebp
call fcn.0050fb50
add esp, 0x14
jmp 0x51f991
mov ecx, dword [esp + 0x30]
mov byte [esp + 0x64], 1
mov eax, dword [eax + 0xc]
lea edx, [edi + ecx]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [eax + ecx]
push edx
push esi
call fcn.00510ee0
add esp, 0xc
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
inc edi
add edx, 0x10
mov ecx, dword [eax]
mov dword [esp + 0x14], edx
cmp edi, ecx
jl 0x51f94d
mov ecx, dword [esp + 0x9c]
mov edx, dword [eax]
mov eax, dword [esp + 0x30]
push 0xfffffffffffffffa
push ecx
mov ecx, dword [esp + 0x9c]
push edx
push eax
push ecx
push 0x60
push ebp
call fcn.0050fb10
push ebp
call fcn.00510c90
mov edi, eax
lea eax, [edi + 1]
push eax
push 0
push eax
push 0x81
push ebp
call fcn.0050fb50
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0xc8]
mov eax, dword [edx]
mov edx, dword [esp + 0x64]
push eax
push ecx
push edx
push esi
call fcn.0051fdb0
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x60]
add esp, 0x44
push eax
lea eax, [ecx + 1]
push eax
push 0x30
push ebp
call fcn.005107e0
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x2c]
push edx
push eax
push 0x7f
push ebp
call fcn.005107e0
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
push ecx
push edx
push 0x30
push ebp
call fcn.005107e0
push edi
push ebp
call fcn.00510ca0
lea eax, [esp + 0x9c]
push eax
push esi
call fcn.00522950
mov ecx, dword [esp + 0x9c]
add esp, 0x40
push ecx
push 1
push 0x31
push ebp
call fcn.005107e0
mov eax, dword [esp + 0x44]
add esp, 0x10
test eax, eax
je 0x51fa85
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x68]
push edx
push eax
push 0x6b
push ebp
call fcn.005107e0
jmp 0x51fa9f
mov ecx, dword [esp + 0x90]
push ecx
call fcn.00528cd0
mov edx, dword [esp + 0x64]
push 1
push edx
push ebp
call fcn.005069f0
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x64]
add esp, 0x10
lea edi, [ecx + 1]
push eax
push edi
push 0x30
push ebp
call fcn.005107e0
mov edx, dword [esp + 0x60]
push edx
push 0
push 0x61
push ebp
call fcn.005107e0
push ebp
call fcn.00510c90
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x40]
push eax
push 1
push 0x31
push ebp
call fcn.005107e0
push edi
push 0x1a
push ebp
call fcn.00510bf0
mov ecx, dword [esp + 0x94]
add esp, 0x40
push ecx
push ebp
call fcn.00510c70
push ebp
call fcn.00510c90
mov edx, dword [esp + 0x68]
mov dword [esp + 0x60], eax
add eax, 2
push eax
push edx
push 0x7f
push ebp
call fcn.005107e0
push edi
push 0x1a
push ebp
call fcn.00510bf0
lea eax, [esp + 0x8c]
push eax
push esi
call fcn.005228f0
mov eax, dword [esp + 0x74]
add esp, 0x30
test eax, eax
je 0x51fb4b
mov ecx, dword [esp + 0x54]
push 8
inc ecx
push ecx
push eax
push esi
call fcn.00512fd0
add esp, 0x10
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0xe0]
inc eax
push edx
mov edx, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [ebx]
push edx
push eax
push 0
push 0
push ecx
push ebx
push esi
call fcn.005201b0
push edi
push 0x1a
push ebp
call fcn.00510bf0
mov edx, dword [esp + 0x74]
push edx
push ebp
call fcn.00510c70
lea eax, [esp + 0xa0]
push eax
push esi
call fcn.00522820
mov ecx, dword [esp + 0x80]
add esp, 0x44
push ecx
push 0x1a
push ebp
call fcn.00510bf0
add esp, 0xc
jmp 0x51fcf0
push ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x44], eax
call fcn.005227a0
add esp, 4
mov byte [esp + 0x3c], al
test al, al
je 0x51fc13
mov edx, dword [ebx]
mov edi, dword [esp + 0x24]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
push edx
push edi
call fcn.00514c20
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
mov dword [esp + 0x40], eax
je 0x51fc13
mov cl, byte [edi + 0x1e]
test cl, cl
jne 0x51fc13
mov cl, byte [esp + 0x3c]
mov edx, dword [eax + 0xc]
cmp cl, 1
setne cl
mov byte [edx + 8], cl
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov byte [edx], 0x97
lea eax, [esp + 0x64]
push eax
push esi
call fcn.00522820
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x3c]
push 0
lea edx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x38]
push edx
push eax
push ecx
push esi
call fcn.005251c0
mov edi, eax
add esp, 0x20
test edi, edi
jne 0x51fc5a
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x24]
push edx
push eax
call fcn.00508080
add esp, 8
jmp 0x51fd58
lea ecx, [esp + 0x64]
push ecx
push esi
call fcn.00522950
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
jne 0x51fc89
mov al, byte [esp + 0x3c]
test al, al
je 0x51fc89
mov edx, dword [edi + 0x18]
push edx
push 0
push 0x61
push ebp
call fcn.005107e0
add esp, 0x10
push edi
call fcn.00528cd0
lea eax, [esp + 0x68]
push eax
push esi
call fcn.005228f0
mov eax, dword [esp + 0x50]
add esp, 0xc
test eax, eax
mov dword [esp + 0x18], 0
je 0x51fcbe
mov ecx, dword [esp + 0x50]
push 8
push ecx
push eax
push esi
call fcn.00512fd0
add esp, 0x10
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0xe0]
push eax
push eax
mov eax, dword [ebx]
push edx
push 0xffffffffffffffff
push 0
push 0
push 0
push eax
push ebx
push esi
call fcn.005201b0
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x4c]
push ecx
push edx
call fcn.00508080
add esp, 0x30
mov eax, dword [esp + 0x50]
push eax
push ebp
call fcn.00510c70
add esp, 8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x51fd20
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0xe0]
push ecx
mov eax, dword [edx]
push eax
push ebp
push ebx
push esi
call fcn.005207d0
add esp, 0x14
mov ecx, dword [esp + 0x98]
push ecx
push ebp
call fcn.00510c70
mov edx, dword [esp + 0xe8]
add esp, 8
mov dword [esp + 0x14], 0
cmp byte [edx], 5
jne 0x51fd58
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x28]
push eax
push ecx
push esi
call fcn.00520a50
add esp, 0xc
mov edx, dword [esp + 0x74]
mov esi, dword [esp + 0x24]
push edx
push esi
call fcn.004ee360
mov eax, dword [esp + 0x8c]
push eax
push esi
call fcn.004ee360
mov eax, dword [esp + 0x24]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc4
ret