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

Disassembly:
sub esp, 0x4c
push ebx
xor ebx, ebx
cmp dword [esp + 0x6c], ebx
push ebp
push esi
mov esi, dword [esp + 0x5c]
mov ebp, dword [esi + 8]
mov eax, dword [esi]
setne byte [esp + 0xe]
push edi
mov edi, dword [esp + 0x64]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x58], ebx
mov byte [esp + 0x13], bl
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x38], eax
cmp ebp, ebx
jne 0x51bfe6
push esi
call fcn.004d6270
mov ebp, eax
add esp, 4
mov dword [esi + 8], eax
cmp ebp, ebx
je 0x51bfd2
push ebx
push ebx
push ebx
push 0x9f
push ebp
call fcn.004cf760
add esp, 0x14
cmp dword [esi + 0x19c], ebx
jne 0x51bfe6
mov ecx, dword [esi]
test byte [ecx + 0x3c], 8
jne 0x51bfe6
mov byte [esi + 0x17], 1
test byte [edi + 0x2a], 0x20
movsx ecx, word [edi + 0x22]
mov dword [esp + 0x54], ecx
jne 0x51c002
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x34], 1
jmp 0x51c02e
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x51c022
lea esp, [esp]
mov edx, dword [eax + 0x38]
and dl, 3
cmp dl, 2
je 0x51c022
mov eax, dword [eax + 0x14]
cmp eax, ebx
jne 0x51c010
mov dword [esp + 0x1c], eax
movzx eax, word [eax + 0x32]
mov dword [esp + 0x34], eax
cmp ecx, ebx
mov dword [esp + 0x20], ebx
jle 0x51c21f
mov dword [esp + 0x30], ebx
mov edi, edi
movsx ecx, word [edi + 0x20]
cmp ebx, ecx
je 0x51c205
mov edx, dword [esp + 0x64]
mov eax, dword [edx + 4]
mov ecx, dword [esp + 0x30]
movzx edi, byte [eax + ecx + 0x14]
add eax, ecx
test edi, edi
je 0x51c205
mov cl, byte [esp + 0x80]
cmp cl, 0xa
je 0x51c077
movzx edi, cl
jmp 0x51c07c
cmp edi, 0xa
je 0x51c087
cmp edi, 5
jne 0x51c08c
cmp dword [eax + 4], 0
jne 0x51c08c
mov edi, 2
lea eax, [edi - 1]
cmp eax, 3
ja case.default.0x51c098
jmp dword [eax*4 + 0x51d350]
mov eax, dword [esi + 0x19c]
test eax, eax
jne 0x51c0ab
mov eax, esi
mov byte [eax + 0x15], 1
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x38]
mov eax, edx
mov edx, dword [eax + 4]
mov edx, dword [ecx + edx]
mov eax, dword [eax]
push edx
push eax
push str._s._s
call fcn.004e0090
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x80]
mov ebx, eax
lea eax, [ecx + edx + 1]
push eax
push edi
push 0x513
push 0x15
push ebp
call fcn.004cf760
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
add esp, 0x20
test ecx, ecx
je 0x51c139
cmp byte [edx + 0x41], 0
jne 0x51c139
xor edi, edi
cmp eax, edi
jge 0x51c10a
mov eax, dword [ebp + 0x20]
dec eax
lea eax, [eax + eax*4]
lea esi, [ecx + eax*4]
movsx eax, byte [esi + 1]
mov ecx, dword [esi + 0x10]
push edx
call fcn.004cf9f0
add esp, 4
mov dword [esi + 0x10], edi
cmp ebx, edi
jne 0x51c130
mov dword [esi + 0x10], edi
mov byte [esi + 1], 0
jmp 0x51c147
mov dword [esi + 0x10], ebx
mov byte [esi + 1], 0xff
jmp 0x51c147
push edx
mov ecx, ebx
or eax, 0xffffffff
call fcn.004cf9f0
add esp, 4
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp]
dec eax
cmp byte [ecx + 0x41], 0
je 0x51c166
mov ebx, dword [esp + 0x20]
mov eax, 0x5a2838
mov byte [eax + 3], 1
jmp 0x51c201
mov ebx, dword [esp + 0x20]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov byte [eax + 3], 1
jmp 0x51c201
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x74]
push 0
push ecx
lea eax, [ebx + edx + 1]
push eax
push 0x4c
push ebp
call fcn.004cf760
add esp, 0x14
jmp 0x51c205
mov ecx, dword [esp + 0x74]
push 0
push 0
lea esi, [ebx + ecx + 1]
push esi
push 0x4d
push ebp
call fcn.004cf760
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x44]
mov edi, eax
mov eax, dword [edx + 4]
mov edx, dword [ecx + eax + 4]
mov eax, dword [esp + 0x74]
push esi
push edx
push eax
call fcn.0051b9e0
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
dec ecx
add esp, 0x20
mov dword [edx + 0x5c], ecx
mov eax, dword [ebp + 0x20]
test edi, edi
jge 0x51c1e5
lea edi, [eax - 1]
mov ecx, dword [ebp]
cmp byte [ecx + 0x41], 0
je 0x51c1f5
mov ecx, 0x5a2838
jmp 0x51c1fe
mov ecx, dword [ebp + 4]
lea edx, [edi + edi*4]
lea ecx, [ecx + edx*4]
mov dword [ecx + 8], eax
mov esi, dword [esp + 0x60]
add dword [esp + 0x30], 0x18
mov edi, dword [esp + 0x64]
inc ebx
cmp ebx, dword [esp + 0x54]
mov dword [esp + 0x20], ebx
jl 0x51c040
xor ebx, ebx
mov eax, dword [edi + 0x18]
mov dword [esp + 0x30], eax
cmp eax, ebx
je 0x51c3c6
mov edx, dword [esp + 0x38]
test dword [edx + 0x18], 0x2000
jne 0x51c3c6
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x60]
inc eax
mov dword [ecx + 0x60], eax
mov al, byte [esp + 0x80]
cmp al, 0xa
je 0x51c25f
movzx edx, al
mov dword [esp + 0x18], edx
jmp 0x51c267
mov dword [esp + 0x18], 2
mov eax, dword [esp + 0x30]
cmp dword [eax], 0
mov dword [esp + 0x20], 0
jle 0x51c3c6
mov dword [esp + 0x2c], 0
mov esi, eax
mov eax, dword [ebp + 0x18]
mov ebx, dword [eax + 0x70]
lea edx, [ebx - 1]
lea ecx, [ebx + 1]
mov dword [esp + 0x28], eax
mov dword [eax + 0x70], ecx
test ebx, edx
jne 0x51c2c5
lea eax, [ebx*8 + 4]
push 0
push eax
mov eax, dword [esp + 0x30]
mov edi, dword [eax + 0x74]
mov esi, dword [eax]
call fcn.004cbab0
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x38]
mov dword [ecx + 0x74], eax
add esp, 8
mov eax, ecx
mov eax, dword [eax + 0x74]
test eax, eax
je 0x51c2d3
mov dword [eax + ebx*4], 0xffffffff
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + edx]
mov edx, dword [esp + 0x60]
or edi, 0xffffffff
push 0x10
sub edi, ebx
push edi
push ecx
push edx
call fcn.00516970
add esp, 0x10
cmp dword [esp + 0x18], 4
jne 0x51c353
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
cmp dword [ecx + 0x54], eax
jg 0x51c323
mov edx, dword [esp + 0x84]
push 0
push edx
push 0
push 0xe
mov esi, ebp
call fcn.004cf720
mov esi, dword [esp + 0x40]
add esp, 0x10
jmp 0x51c391
lea ecx, [eax + 1]
mov dword [ebp + 0x20], ecx
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x84]
xor ecx, ecx
mov byte [eax], 0xe
mov byte [eax + 3], 0
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
jmp 0x51c391
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + eax + 4]
test eax, eax
jne 0x51c368
mov edx, dword [esp + 0x64]
mov eax, dword [edx]
mov ecx, dword [esp + 0x18]
cmp ecx, 5
jne 0x51c37a
mov ecx, 2
mov dword [esp + 0x18], ecx
push 3
push 0
push eax
mov eax, dword [esp + 0x6c]
push ecx
push 0x113
call fcn.004dc580
add esp, 0x14
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx + 0x74]
test eax, eax
je 0x51c3a9
lea edx, [edi*4 + 4]
sub eax, edx
mov edx, dword [ebp + 0x20]
mov dword [eax], edx
mov eax, dword [ebp + 0x20]
add dword [esp + 0x2c], 0x18
dec eax
mov dword [ecx + 0x5c], eax
mov eax, dword [esp + 0x20]
inc eax
cmp eax, dword [esi]
mov dword [esp + 0x20], eax
jl 0x51c286
cmp byte [esp + 0x7c], 0
je 0x51c788
xor edi, edi
cmp dword [esp + 0x1c], edi
jne 0x51c788
mov eax, dword [ebp + 0x18]
mov ebx, dword [eax + 0x70]
lea edx, [ebx - 1]
lea ecx, [ebx + 1]
mov dword [esp + 0x50], eax
mov dword [eax + 0x70], ecx
test ebx, edx
jne 0x51c415
mov esi, dword [eax]
lea ecx, [ebx*8 + 4]
push edi
mov edi, dword [eax + 0x74]
push ecx
call fcn.004cbab0
mov edx, dword [esp + 0x58]
add esp, 8
mov dword [edx + 0x74], eax
mov eax, edx
xor edi, edi
mov eax, dword [eax + 0x74]
cmp eax, edi
je 0x51c423
mov dword [eax + ebx*4], 0xffffffff
mov cl, byte [esp + 0x80]
or eax, 0xffffffff
sub eax, ebx
mov ebx, dword [esp + 0x64]
movzx esi, byte [ebx + 0x2b]
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], esi
cmp cl, 0xa
je 0x51c449
movzx esi, cl
jmp 0x51c453
cmp esi, 0xa
jne 0x51c457
mov esi, 2
mov dword [esp + 0x18], esi
cmp byte [esp + 0x12], 0
je 0x51c495
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
push ecx
push eax
push edx
push 0x4f
push ebp
call fcn.004cf760
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp]
add esp, 0x14
dec eax
cmp byte [ecx + 0x41], 0
je 0x51c488
mov eax, 0x5a2838
jmp 0x51c491
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov byte [eax + 3], 0x90
cmp esi, 5
jne 0x51c50e
cmp byte [esp + 0x80], 5
je 0x51c50e
mov eax, dword [ebx + 8]
cmp eax, edi
je 0x51c50e
jmp 0x51c4b0
mov cl, byte [eax + 0x36]
cmp cl, 4
je 0x51c4c6
cmp cl, 3
je 0x51c4c6
mov eax, dword [eax + 0x14]
cmp eax, edi
jne 0x51c4b0
jmp 0x51c50e
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
cmp dword [edx + 0x54], ecx
jg 0x51c4e2
push edi
push edi
push edi
push 0xe
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51c50a
lea eax, [ecx + 1]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 4]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
mov byte [eax], 0xe
mov byte [eax + 3], 0
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], edi
mov byte [eax + 1], 0
mov eax, ecx
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
cmp dword [ecx + 0x54], eax
mov edi, dword [esp + 0x6c]
jg 0x51c536
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x30]
push edx
push eax
push edi
push 0x4a
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51c568
lea ecx, [eax + 1]
mov dword [ebp + 0x20], ecx
mov ecx, dword [esp + 0x30]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x74]
mov byte [eax], 0x4a
mov byte [eax + 3], 0
mov dword [eax + 4], edi
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
mov eax, dword [esp + 0x18]
dec eax
cmp eax, 4
ja case.default.0x51c576
jmp dword [eax*4 + 0x51d360]
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x60]
xor ebx, ebx
test dword [eax + 0x18], 0x40000
je 0x51c5a8
mov edx, dword [esp + 0x64]
push ebx
push ebx
push 0x6d
mov eax, esi
call fcn.004c8d50
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x51c61c
mov ecx, dword [esi]
test dword [ecx + 0x18], 0x80000
je 0x51c5e2
mov eax, dword [esp + 0x64]
mov ecx, dword [eax]
lea edx, [esp + 0x54]
push edx
mov edx, dword [eax + 0x40]
push ecx
add edx, 0x38
push edx
call fcn.004c0a30
add esp, 0xc
test eax, eax
je 0x51c5d8
cmp dword [eax + 8], 0
jne 0x51c61c
mov eax, dword [esp + 0x64]
cmp dword [eax + 0x10], 0
jne 0x51c61c
mov ecx, dword [esp + 0x64]
cmp dword [ecx + 8], 0
je 0x51c653
mov eax, dword [esi + 0x19c]
test eax, eax
jne 0x51c5f8
mov eax, esi
mov edx, dword [esp + 0x70]
push 0xffffffffffffffff
push 0
push edx
push edi
push esi
mov byte [eax + 0x14], 1
call fcn.004fea40
add esp, 0x14
mov dword [esp + 0x40], 1
jmp 0x51c6da
mov eax, dword [esi + 0x19c]
test eax, eax
jne 0x51c628
mov eax, esi
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x64]
push 0xffffffffffffffff
push 1
push 5
push 0
push 1
mov byte [eax + 0x14], 1
mov eax, dword [esp + 0x88]
push eax
push ecx
push edi
push ebx
push edx
push esi
call fcn.00520f30
add esp, 0x2c
mov dword [esp + 0x40], 1
jmp 0x51c6da
mov eax, dword [esp + 0x84]
push 0
push eax
push 0
push 0xe
push ebp
call fcn.004cf760
jmp 0x51c6d7
mov dword [esp + 0x18], 2
mov ecx, ebx
movzx eax, word [ecx + 0x20]
mov ebx, dword [esp + 0x60]
mov esi, dword [ebx]
test ax, ax
jl 0x51c6b0
cwde
lea edx, [eax + eax*2]
mov eax, ecx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + edx*8]
mov eax, dword [eax]
push edx
push eax
push str._s._s
call fcn.004e0090
add esp, 0xc
mov ecx, 0x613
jmp 0x51c6c5
mov edx, dword [ecx]
push edx
push str._s.rowid
call fcn.004e0090
add esp, 8
mov ecx, 0xa13
push 2
push 0xffffffffffffffff
push eax
mov eax, dword [esp + 0x24]
push eax
push ecx
mov eax, ebx
call fcn.004dc580
add esp, 0x14
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx + 0x74]
test eax, eax
je 0x51c6f6
mov edx, dword [esp + 0x30]
lea edx, [edx*4 + 4]
sub eax, edx
mov edx, dword [ebp + 0x20]
mov dword [eax], edx
mov eax, dword [ebp + 0x20]
dec eax
cmp dword [esp + 0x3c], 0
mov dword [ecx + 0x5c], eax
je 0x51c788
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
cmp dword [edx + 0x54], ecx
jg 0x51c727
push 0
push 0
push 0
push 0xe
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51c750
lea eax, [ecx + 1]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 4]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
xor edx, edx
mov byte [eax], 0xe
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov eax, ecx
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
dec ecx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x3c]
mov dword [edx + 0x5c], ecx
mov ecx, dword [ebp + 0x20]
test eax, eax
jge 0x51c76c
lea eax, [ecx - 1]
mov edx, dword [ebp]
cmp byte [edx + 0x41], 0
je 0x51c77c
mov eax, 0x5a2838
jmp 0x51c785
mov edx, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x64]
mov eax, dword [eax + 8]
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], eax
test eax, eax
je 0x51d287
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x30]
cmp dword [ecx + edx*4], 0
je 0x51d270
cmp byte [esp + 0x13], 0
jne 0x51c7d4
mov eax, dword [esp + 0x74]
inc eax
push eax
mov eax, dword [esp + 0x68]
push ebp
call fcn.004d8c40
add esp, 8
mov byte [esp + 0x13], 1
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebx + 0x70]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x30]
add edx, ecx
lea ecx, [edi - 1]
lea eax, [edi + 1]
mov dword [esp + 0x2c], edx
mov dword [ebx + 0x70], eax
test edi, ecx
jne 0x51c877
mov eax, dword [ebx + 0x74]
mov esi, dword [ebx]
lea edx, [edi*8 + 4]
push 0
push edx
mov dword [esp + 0x30], eax
push eax
mov eax, esi
call fcn.004cb9e0
add esp, 0xc
mov dword [esp + 0x50], eax
test eax, eax
jne 0x51c870
mov eax, dword [esp + 0x28]
test eax, eax
je 0x51c870
test esi, esi
je 0x51c863
cmp dword [esi + 0x208], 0
je 0x51c83d
mov ecx, esi
call fcn.004bf640
jmp 0x51c870
cmp eax, dword [esi + 0x114]
jb 0x51c863
cmp eax, dword [esi + 0x118]
jae 0x51c863
mov ecx, dword [esi + 0x110]
mov dword [eax], ecx
dec dword [esi + 0xfc]
mov dword [esi + 0x110], eax
jmp 0x51c870
mov edx, dword [esp + 0x28]
push edx
call fcn.004bf5d0
add esp, 4
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x74], eax
mov ebx, dword [ebx + 0x74]
xor edx, edx
cmp ebx, edx
je 0x51c887
mov dword [ebx + edi*4], 0xffffffff
mov esi, dword [esp + 0x14]
or eax, 0xffffffff
sub eax, edi
mov dword [esp + 0x24], eax
cmp dword [esi + 0x24], edx
je 0x51c93d
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x68]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp + 0x20]
mov esi, dword [ebp + 0x18]
cmp dword [esi + 0x54], eax
jg 0x51c8c6
push 0
push ecx
push 0
push 0x1a
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51c8ec
lea esi, [eax + 1]
mov dword [ebp + 0x20], esi
mov esi, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov byte [eax], 0x1a
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], 0
mov ecx, dword [esp + 0x74]
mov edi, dword [esp + 0x60]
mov edx, dword [esp + 0x14]
mov esi, dword [edi]
inc ecx
push 0
mov dword [edi + 0x60], ecx
mov eax, dword [edx + 0x24]
push 0
push eax
push esi
call fcn.004db5a0
add esp, 0x10
cmp byte [esi + 0x41], 0
mov ebx, eax
jne 0x51c928
mov eax, dword [esp + 0x24]
push 0x10
push eax
push ebx
push edi
call fcn.00516c80
add esp, 0x10
push ebx
push esi
call fcn.004d15b0
mov esi, dword [esp + 0x1c]
add esp, 8
mov dword [edi + 0x60], 0
mov ecx, dword [esp + 0x60]
movzx eax, word [esi + 0x34]
mov edx, dword [ecx + 0x38]
cmp eax, edx
mov ebx, dword [ecx + 0x3c]
mov dword [esp + 0x28], ebx
jg 0x51c960
lea edi, [eax + ebx]
sub edx, eax
mov dword [ecx + 0x3c], edi
mov dword [ecx + 0x38], edx
jmp 0x51c971
mov edx, dword [ecx + 0x48]
lea edi, [edx + 1]
add eax, edx
mov dword [esp + 0x28], edi
mov dword [ecx + 0x48], eax
mov ebx, edi
xor eax, eax
xor edx, edx
mov dword [esp + 0x20], eax
cmp dx, word [esi + 0x34]
jae 0x51cb5b
mov edi, ebx
mov dword [esp + 0x18], edx
lea esp, [esp]
mov edx, dword [esi + 4]
movsx eax, word [edx + eax*2]
cmp eax, 0xfffffffe
jne 0x51cab1
mov eax, dword [esp + 0x74]
inc eax
mov dword [ecx + 0x60], eax
mov edx, dword [esi + 0x28]
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x18]
mov eax, dword [edx + eax]
mov esi, dword [ecx]
push 0
push 0
push eax
push esi
mov dword [esp + 0x60], esi
call fcn.004db5a0
add esp, 0x10
cmp byte [esi + 0x41], 0
mov ebx, eax
jne 0x51ca8f
test ebx, ebx
je 0x51ca2f
cmp byte [ebx], 0x9d
jne 0x51ca2f
mov eax, dword [esp + 0x60]
mov esi, dword [eax + 8]
mov eax, dword [esi + 0x20]
mov edx, dword [esi + 0x18]
cmp dword [edx + 0x54], eax
mov ecx, dword [ebx + 0x1c]
jg 0x51ca06
push 0
push edi
push ecx
push 0x1f
call fcn.004cf720
add esp, 0x10
jmp 0x51ca8f
lea edx, [eax + 1]
mov dword [esi + 0x20], edx
mov edx, dword [esi + 4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax + 4], ecx
xor ecx, ecx
mov byte [eax], 0x1f
mov byte [eax + 3], 0
mov dword [eax + 8], edi
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
jmp 0x51ca8f
mov eax, dword [esp + 0x60]
push edi
push ebx
push eax
call fcn.0051ab60
add esp, 0xc
cmp eax, edi
je 0x51ca8f
mov ecx, dword [esp + 0x60]
mov esi, dword [ecx + 8]
test esi, esi
je 0x51ca8f
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x18]
cmp dword [edx + 0x54], ecx
jg 0x51ca68
push 0
push edi
push eax
push 0x20
call fcn.004cf720
add esp, 0x10
jmp 0x51ca8f
lea edx, [ecx + 1]
mov dword [esi + 0x20], edx
mov edx, dword [esi + 4]
lea ecx, [ecx + ecx*4]
lea ecx, [edx + ecx*4]
mov dword [ecx + 4], eax
xor eax, eax
mov byte [ecx], 0x20
mov byte [ecx + 3], 0
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov byte [ecx + 1], al
mov eax, dword [esp + 0x50]
push ebx
push eax
call fcn.004d15b0
mov ecx, dword [esp + 0x68]
mov esi, dword [esp + 0x1c]
add esp, 8
mov dword [ecx + 0x60], 0
jmp 0x51cb3c
cmp eax, 0xffffffff
je 0x51cacc
mov edx, dword [esp + 0x64]
movsx edx, word [edx + 0x20]
cmp eax, edx
je 0x51cacc
mov ecx, dword [esp + 0x74]
lea edx, [eax + ecx + 1]
jmp 0x51cae8
cmp dword [esp + 0x44], edi
je 0x51cb40
cmp dword [esi + 0x24], 0
mov edx, dword [esp + 0x74]
mov dword [esp + 0x44], 0xffffffff
jne 0x51cae8
mov dword [esp + 0x44], edi
mov ebx, dword [ebp + 0x18]
xor ecx, ecx
test eax, eax
mov eax, dword [ebp + 0x20]
setl cl
add ecx, 0x20
cmp dword [ebx + 0x54], eax
jg 0x51cb12
push 0
push edi
push edx
push ecx
mov esi, ebp
call fcn.004cf720
mov esi, dword [esp + 0x24]
add esp, 0x10
jmp 0x51cb38
lea ebx, [eax + 1]
mov dword [ebp + 0x20], ebx
mov ebx, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [ebx + eax*4]
mov byte [eax], cl
xor ecx, ecx
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], edi
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
movzx edx, word [esi + 0x34]
add dword [esp + 0x18], 0x18
inc eax
inc edi
cmp eax, edx
mov dword [esp + 0x20], eax
jl 0x51c990
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x30]
mov ecx, dword [eax + ecx*4]
movzx edx, word [esi + 0x34]
mov eax, dword [ebp + 0x20]
mov esi, dword [ebp + 0x18]
cmp dword [esi + 0x54], eax
jg 0x51cb86
push ecx
push edx
push ebx
push 0x32
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51cbb0
lea esi, [eax + 1]
mov dword [ebp + 0x20], esi
mov esi, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov byte [eax], 0x32
mov byte [eax + 3], 0
mov dword [eax + 4], ebx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
mov edi, dword [esp + 0x14]
movzx eax, word [edi + 0x34]
mov esi, dword [esp + 0x60]
push ebx
call fcn.004c6f00
add esp, 4
cmp byte [esp + 0x12], 0
je 0x51cc01
cmp dword [esp + 0x1c], edi
jne 0x51cc01
cmp byte [esp + 0x7c], 0
jne 0x51cc01
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx + 0x74]
test eax, eax
je 0x51cbf5
mov edx, dword [esp + 0x24]
lea edx, [edx*4 + 4]
sub eax, edx
mov edx, dword [ebp + 0x20]
mov dword [eax], edx
mov eax, dword [ebp + 0x20]
dec eax
mov dword [ecx + 0x5c], eax
jmp 0x51d270
movzx ecx, byte [edi + 0x36]
mov dword [esp + 0x18], ecx
test ecx, ecx
jne 0x51cc31
mov ecx, dword [esp + 0x14]
movzx edi, word [ecx + 0x34]
push ebx
mov eax, edi
call fcn.004c6f00
mov edx, esi
add esp, 4
cmp edi, dword [edx + 0x38]
jle 0x51cbd9
mov eax, edx
mov dword [eax + 0x38], edi
mov dword [eax + 0x3c], ebx
jmp 0x51cbd9
mov al, byte [esp + 0x80]
cmp al, 0xa
je 0x51cc45
movzx ecx, al
mov dword [esp + 0x18], ecx
jmp 0x51cc52
cmp ecx, 0xa
jne 0x51cc52
mov dword [esp + 0x18], 2
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
cmp dword [eax + 0x54], ecx
mov edx, dword [esp + 0x14]
movzx edi, word [edx + 0x32]
jg 0x51cc7e
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push ebx
push ecx
push edx
push 0x45
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51ccb2
lea eax, [ecx + 1]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 4]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x2c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x24]
mov byte [eax], 0x45
mov byte [eax + 3], 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
mov eax, ecx
mov esi, dword [ebp + 4]
mov ecx, dword [ebp]
test esi, esi
je 0x51cce6
cmp byte [ecx + 0x41], 0
jne 0x51cce6
test eax, eax
jge 0x51ccca
mov eax, dword [ebp + 0x20]
dec eax
lea eax, [eax + eax*4]
lea esi, [esi + eax*4]
movsx eax, byte [esi + 1]
push ecx
mov ecx, dword [esi + 0x10]
call fcn.004cf9f0
mov dword [esi + 0x10], edi
mov byte [esi + 1], 0xf2
jmp 0x51ccf3
push ecx
mov ecx, edi
mov eax, 0xfffffff2
call fcn.004cf9f0
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
add esp, 4
cmp esi, edi
jne 0x51cd08
mov dword [esp + 0x20], ebx
jmp 0x51cd39
mov edx, dword [esp + 0x60]
mov eax, dword [edx + 0x38]
mov ebx, dword [esp + 0x34]
cmp ebx, eax
mov ecx, dword [edx + 0x3c]
jg 0x51cd28
add ebx, ecx
sub eax, dword [esp + 0x34]
mov dword [edx + 0x3c], ebx
mov dword [edx + 0x38], eax
jmp 0x51cd33
mov eax, dword [edx + 0x48]
lea ecx, [eax + 1]
add eax, ebx
mov dword [edx + 0x48], eax
mov ebx, ecx
mov dword [esp + 0x20], ecx
cmp byte [esp + 0x12], 0
jne 0x51cd4b
cmp dword [esp + 0x18], 5
jne 0x51d0ce
mov ecx, dword [esp + 0x64]
test byte [ecx + 0x2a], 0x20
jne 0x51ce33
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
cmp dword [edx + 0x54], eax
jg 0x51cd7a
mov eax, dword [esp + 0x2c]
push 0
push ebx
push eax
push 0x72
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51cda5
lea ecx, [eax + 1]
mov dword [ebp + 0x20], ecx
mov ecx, dword [esp + 0x2c]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov dword [eax + 4], ecx
xor ecx, ecx
mov byte [eax], 0x72
mov byte [eax + 3], 0
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
cmp byte [esp + 0x12], 0
je 0x51d0ce
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
cmp dword [edx + 0x54], eax
jg 0x51cdd4
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x24]
push eax
push ecx
push ebx
push 0x4f
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51ce06
mov ecx, dword [ebp + 4]
lea edx, [eax + 1]
mov dword [ebp + 0x20], edx
mov edx, dword [esp + 0x24]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x78]
mov byte [eax], 0x4f
mov byte [eax + 3], 0
mov dword [eax + 4], ebx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp]
dec eax
cmp byte [edx + 0x41], 0
je 0x51ce21
mov eax, 0x5a2838
mov byte [eax + 3], 0x90
jmp 0x51d0ce
mov ecx, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*4]
mov byte [eax + 3], 0x90
jmp 0x51d0ce
cmp esi, edi
je 0x51cee9
mov eax, dword [esp + 0x1c]
xor edx, edx
xor ebx, ebx
cmp dx, word [eax + 0x32]
jae 0x51cee9
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
movzx edx, word [ecx + 0x34]
xor eax, eax
test edx, edx
jle 0x51ce7e
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 4]
movzx esi, word [ecx + ebx*2]
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 4]
cmp si, word [ecx]
je 0x51cea4
inc eax
add ecx, 2
cmp eax, edx
jl 0x51ce71
or eax, 0xffffffff
mov edx, dword [ebp + 0x18]
movsx ecx, ax
mov eax, dword [ebp + 0x20]
cmp dword [edx + 0x54], eax
jg 0x51cea9
mov eax, dword [esp + 0x2c]
push edi
push ecx
push eax
push 0x30
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51ced7
movzx eax, ax
jmp 0x51ce81
lea edx, [eax + 1]
mov dword [ebp + 0x20], edx
mov edx, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov edx, dword [esp + 0x2c]
mov byte [eax], 0x30
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
mov eax, dword [esp + 0x1c]
movzx ecx, word [eax + 0x32]
inc ebx
inc edi
cmp ebx, ecx
jl 0x51ce51
cmp byte [esp + 0x12], 0
je 0x51d0ca
mov edx, dword [esp + 0x1c]
movzx eax, word [edx + 0x32]
mov ecx, dword [ebp + 0x20]
mov ebx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x38]
and dl, 3
mov dword [esp + 0x2c], 0x4e
cmp dl, 2
jne 0x51cf2a
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x4c], ecx
jmp 0x51cf2e
mov dword [esp + 0x4c], ebx
xor edi, edi
test eax, eax
jle 0x51d0ce
jmp 0x51cf40
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x20]
mov esi, dword [eax + edi*4]
mov ecx, dword [esp + 0x60]
mov eax, dword [ecx]
mov dl, byte [eax + 0x3e]
mov bl, byte [eax + 0x91]
mov byte [esp + 0x54], dl
test esi, esi
je 0x51cf70
movzx ecx, bl
push ecx
push esi
call fcn.004d8510
add esp, 8
jmp 0x51cf73
mov eax, dword [eax + 8]
test eax, eax
je 0x51cf83
movzx ecx, byte [esp + 0x54]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4 - 0x14]
mov dword [esp + 0x50], eax
test bl, bl
jne 0x51cfac
test eax, eax
je 0x51cf95
cmp dword [eax + 0xc], 0
jne 0x51cfac
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x60]
push esi
push ecx
push edx
call fcn.004e4fd0
add esp, 0xc
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 4]
movzx ecx, word [ecx + 0x32]
movsx eax, word [eax + edi*2]
dec ecx
cmp edi, ecx
jne 0x51cfd0
mov edx, dword [esp + 0x24]
mov dword [esp + 0x48], edx
mov dword [esp + 0x2c], 0x4f
mov ecx, dword [esp + 0x78]
mov edx, dword [ebp + 0x18]
lea esi, [ecx + eax + 1]
mov ecx, dword [ebp + 0x20]
cmp dword [edx + 0x54], ecx
jg 0x51d001
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
add eax, edi
push eax
push ecx
push esi
push edx
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51d03a
lea eax, [ecx + 1]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 4]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
mov dl, byte [esp + 0x2c]
mov byte [eax], dl
mov edx, dword [esp + 0x48]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x4c]
add edx, edi
mov byte [eax + 3], 0
mov dword [eax + 4], esi
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
mov eax, ecx
mov edx, dword [ebp + 4]
mov ecx, dword [ebp]
xor ebx, ebx
cmp edx, ebx
je 0x51d086
cmp byte [ecx + 0x41], bl
jne 0x51d086
cmp eax, ebx
jge 0x51d053
mov eax, dword [ebp + 0x20]
dec eax
lea eax, [eax + eax*4]
lea esi, [edx + eax*4]
movsx eax, byte [esi + 1]
push ecx
mov ecx, dword [esi + 0x10]
call fcn.004cf9f0
mov eax, dword [esp + 0x54]
add esp, 4
mov dword [esi + 0x10], ebx
cmp eax, ebx
jne 0x51d07d
mov dword [esi + 0x10], ebx
mov byte [esi + 1], 0
jmp 0x51d098
mov dword [esi + 0x10], eax
mov byte [esi + 1], 0xfc
jmp 0x51d098
push ecx
mov ecx, dword [esp + 0x54]
mov eax, 0xfffffffc
call fcn.004cf9f0
add esp, 4
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp]
dec eax
cmp byte [ecx + 0x41], 0
je 0x51d0ac
mov eax, 0x5a2838
jmp 0x51d0b5
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov ecx, dword [esp + 0x1c]
mov byte [eax + 3], 0x90
movzx edx, word [ecx + 0x32]
inc edi
cmp edi, edx
jl 0x51cf40
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x51d162
cmp eax, 3
jle 0x51d14a
cmp eax, 4
jne 0x51d162
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
cmp dword [ecx + 0x54], eax
jg 0x51d10c
mov edx, dword [esp + 0x84]
push 0
push edx
push 0
push 0xe
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51d205
lea ecx, [eax + 1]
mov dword [ebp + 0x20], ecx
mov ecx, dword [esp + 0x84]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov byte [eax], 0xe
mov byte [eax + 3], 0
mov dword [eax + 4], 0
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
jmp 0x51d205
mov edx, dword [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x68]
push eax
call fcn.004e4ca0
add esp, 0xc
jmp 0x51d205
mov edi, dword [esp + 0x60]
mov eax, dword [edi + 0x19c]
xor esi, esi
test eax, eax
jne 0x51d174
mov eax, edi
mov ecx, dword [esp + 0x38]
mov byte [eax + 0x14], 1
test dword [ecx + 0x18], 0x40000
je 0x51d1c9
mov edx, dword [edi]
xor esi, esi
xor eax, eax
test dword [edx + 0x18], 0x800000
je 0x51d1a3
mov eax, dword [esp + 0x64]
push eax
mov eax, edi
call fcn.004c8c70
add esp, 4
mov ecx, eax
test eax, eax
je 0x51d1c3
lea esp, [esp]
cmp byte [ecx + 8], 0x6d
jne 0x51d1bc
movzx edx, byte [ecx + 9]
or esi, edx
mov ecx, dword [ecx + 0x20]
test ecx, ecx
jne 0x51d1b0
neg esi
sbb esi, esi
and esi, eax
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
mov eax, dword [esp + 0x34]
push 0xffffffffffffffff
sete cl
movzx edx, cl
mov ecx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x74]
push 5
push 0
push eax
mov eax, dword [esp + 0x78]
push ebx
push ecx
push edx
push esi
push eax
push edi
call fcn.00520f30
add esp, 0x2c
mov dword [esp + 0x40], 1
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx + 0x74]
test eax, eax
je 0x51d221
mov edx, dword [esp + 0x24]
lea edx, [edx*4 + 4]
sub eax, edx
mov edx, dword [ebp + 0x20]
mov dword [eax], edx
mov eax, dword [ebp + 0x20]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x60]
dec eax
mov dword [ecx + 0x5c], eax
mov ecx, dword [esp + 0x14]
movzx ebx, word [ecx + 0x34]
push edi
mov eax, ebx
call fcn.004c6f00
add esp, 4
cmp ebx, dword [esi + 0x38]
jle 0x51d24e
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], edi
mov ebx, dword [esp + 0x20]
cmp ebx, edi
je 0x51d270
mov edi, dword [esp + 0x34]
push ebx
mov eax, edi
call fcn.004c6f00
add esp, 4
cmp edi, dword [esi + 0x38]
jle 0x51d270
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], ebx
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x14]
inc dword [esp + 0x30]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x51c7a3
mov eax, dword [esp + 0x3c]
xor edi, edi
cmp eax, edi
je 0x51d339
mov edx, dword [ebp + 0x18]
lea ecx, [eax + 1]
mov eax, dword [ebp + 0x20]
cmp dword [edx + 0x54], eax
jg 0x51d2b4
push edi
push ecx
push edi
push 0xe
mov esi, ebp
call fcn.004cf720
add esp, 0x10
jmp 0x51d2da
lea edx, [eax + 1]
mov dword [ebp + 0x20], edx
mov edx, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov byte [eax], 0xe
mov byte [eax + 3], 0
mov dword [eax + 4], edi
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], edi
mov byte [eax + 1], 0
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
dec eax
mov dword [ecx + 0x5c], eax
mov eax, dword [esp + 0x58]
cmp eax, edi
mov ecx, dword [ebp + 0x20]
jge 0x51d2f2
lea eax, [ecx - 1]
mov edx, dword [ebp]
cmp byte [edx + 0x41], 0
je 0x51d318
pop edi
mov eax, 0x5a2838
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x84]
pop esi
pop ebp
mov dword [ecx], eax
pop ebx
add esp, 0x4c
ret
mov edx, dword [ebp + 4]
lea eax, [eax + eax*4]
pop edi
lea eax, [edx + eax*4]
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x84]
pop esi
pop ebp
mov dword [ecx], eax
pop ebx
add esp, 0x4c
ret
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x88]
pop edi
pop esi
pop ebp
mov dword [eax], edx
pop ebx
add esp, 0x4c
ret