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

Disassembly:
push 0xffffffffffffffff
push 0x64afc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
mov edx, dword [esp + 0x6c]
push ebx
push ebp
push esi
push edi
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
mov dword [esp + 0x10], ecx
jge 0x474de8
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov al, byte [edx]
xor ebp, ebp
cmp al, 0x30
jl 0x474dfc
cmp al, 0x39
mov dword [esp + 0x20], 1
jle 0x474e00
mov dword [esp + 0x20], ebp
mov eax, dword [0x6cf864]
mov ebx, dword [esp + 0x88]
cmp eax, ebp
jbe 0x474f33
push edx
lea ecx, [esp + 0x1c]
call fcn.00643d2c
lea eax, [esp + 0x18]
mov ecx, 0x6cf858
push eax
mov dword [esp + 0x78], ebp
call fcn.004804f0
mov edi, dword [0x6cf85c]
mov dword [esp + 0x24], eax
cmp eax, edi
je 0x474e79
mov esi, dword [eax + 0xc]
mov eax, dword [esp + 0x18]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x474e6a
test cl, cl
je 0x474e66
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x474e6a
add eax, 2
add esi, 2
test cl, cl
jne 0x474e46
xor eax, eax
jmp 0x474e6f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jl 0x474e79
lea eax, [esp + 0x24]
jmp 0x474e81
mov dword [esp + 0x1c], edi
lea eax, [esp + 0x1c]
mov eax, dword [eax]
cmp eax, edi
je 0x474f22
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x24], ecx
lea edx, [esp + 0x25]
movsx cx, cl
push ecx
mov ecx, dword [0x826818]
push edx
mov dword [esp + 0x30], eax
call fcn.00446d60
movsx edi, ax
cmp edi, 0x2710
jl 0x474ef8
mov ecx, dword [0x826818]
xor esi, esi
mov eax, dword [ecx + 0x8ca0]
test eax, eax
jle 0x474f03
push esi
call fcn.0044b9a0
test eax, eax
je 0x474edd
movsx eax, word [eax + 0xa]
cmp eax, edi
je 0x474eee
mov ecx, dword [0x826818]
inc esi
cmp esi, dword [ecx + 0x8ca0]
jl 0x474ecb
jmp 0x474f03
add esi, 0x88b8
mov dword [ebx], esi
jmp 0x474efe
test edi, edi
jl 0x474f03
mov dword [ebx], edi
mov ebp, 1
cmp ebp, dword [esp + 0x84]
jl 0x474f22
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], 0xffffffff
call fcn.00643d26
jmp 0x475cbf
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], 0xffffffff
call fcn.00643d26
mov eax, dword [esp + 0x80]
test eax, eax
je 0x47550d
mov eax, dword [0x6685d4]
xor esi, esi
test eax, eax
jle 0x474f8d
mov ecx, dword [esp + 0x88]
mov edi, 0x668520
lea ebx, [ecx + ebp*4]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x7c]
push edx
push eax
push edi
call dword [fcn.0065f208]
add esp, 0xc
test eax, eax
jne 0x474f80
lea ecx, [esi + 0x7468]
inc ebp
mov dword [ebx], ecx
add ebx, 4
mov eax, dword [0x6685d4]
inc esi
add edi, 0x1e
cmp esi, eax
jl 0x474f5c
mov al, byte [0x6a2e12]
mov dword [esp + 0x14], 0
test al, al
je 0x47500f
mov edx, dword [esp + 0x88]
mov eax, 0x6a2e12
mov edi, 0x3a98
mov esi, 0x6a2e1e
lea ebx, [edx + ebp*4]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x7c]
push ecx
push edx
push eax
call dword [fcn.0065f208]
add esp, 0xc
test eax, eax
jne 0x474ffa
cmp dword [esi - 4], 2
jne 0x474ff4
mov eax, dword [esi]
cmp eax, 0x12d
jl 0x474ff4
cmp eax, 0x142
jg 0x474ff4
mov ecx, dword [0x6a812c]
add eax, 0xfffffed4
cmp eax, ecx
jg 0x474ffa
mov dword [ebx], edi
inc ebp
add ebx, 4
mov ecx, dword [esp + 0x14]
add esi, 0x42
inc ecx
inc edi
lea eax, [esi - 0xc]
mov dword [esp + 0x14], ecx
cmp byte [eax], 0
jne 0x474fb7
mov eax, dword [esp + 0x88]
xor esi, esi
mov dword [esp + 0x1c], esi
lea ebx, [eax + ebp*4]
mov edi, dword [0x73aa64]
test edi, edi
je 0x47508d
mov ecx, dword [0x73aa68]
mov eax, 0xb60b60b7
sub ecx, edi
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp esi, edx
jae 0x47508d
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x7c]
push edx
lea edx, [ecx + edi + 0x9c]
push eax
push edx
call dword [fcn.0065f208]
add esp, 0xc
test eax, eax
jne 0x47507d
mov eax, dword [esp + 0x14]
inc ebp
add ebx, 4
lea ecx, [esi + eax + 0x3a99]
mov dword [ebx - 4], ecx
mov eax, dword [esp + 0x1c]
inc esi
add eax, 0xb4
mov dword [esp + 0x1c], eax
jmp 0x47501f
mov ecx, dword [0x8267e8]
push 0
call dword [sym.imp.TCalc.dll_public:_long_int___thiscall_CalcInterface::GetIndexNum_unsigned_char_const]
xor edi, edi
mov dword [esp + 0x24], eax
test eax, eax
jle 0x475115
mov edx, dword [esp + 0x88]
lea ebx, [edx + ebp*4]
mov ecx, dword [0x8267e8]
push edi
push 0
call dword [sym.imp.TCalc.dll_public:_struct_tag_INDEXINFO____thiscall_CalcInterface::GetIndexInfo_unsigned_char__long_int_const]
test eax, eax
je 0x47510c
mov ecx, dword [esp + 0x7c]
lea esi, [eax + 3]
mov eax, dword [esp + 0x10]
push eax
push ecx
push esi
call dword [fcn.0065f208]
add esp, 0xc
test eax, eax
je 0x475100
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x7c]
push eax
push ecx
push 5
push esi
call dword [sym.imp.TGear.dll_GetPYStr]
add esp, 8
push eax
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x47510c
lea edx, [edi + 0x4e20]
inc ebp
mov dword [ebx], edx
add ebx, 4
mov eax, dword [esp + 0x24]
inc edi
cmp edi, eax
jl 0x4750af
mov eax, dword [0x6adc80]
xor esi, esi
test eax, eax
jle 0x475163
mov eax, dword [esp + 0x88]
mov edi, 0x6a83c3
lea ebx, [eax + ebp*4]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x7c]
push ecx
push edx
push edi
call dword [fcn.0065f208]
add esp, 0xc
test eax, eax
jne 0x475153
lea eax, [esi + 0x7d00]
inc ebp
mov dword [ebx], eax
add ebx, 4
mov eax, dword [0x6adc80]
inc esi
add edi, 0xb18
cmp esi, eax
jl 0x47512f
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x7c]
mov esi, dword [fcn.0065f208]
push ebx
push edi
push 0x69acc4
call esi
add esp, 0xc
test eax, eax
jne 0x475191
mov ecx, dword [esp + 0x88]
inc ebp
mov dword [ecx + ebp*4 - 4], 0x7530
push ebx
push edi
push 0x69acc0
call esi
add esp, 0xc
test eax, eax
jne 0x4751b1
mov edx, dword [esp + 0x88]
inc ebp
mov dword [edx + ebp*4 - 4], 0x7531
mov eax, dword [0x827a60]
mov dword [esp + 0x14], 0
test eax, eax
jle 0x4752ba
mov dword [esp + 0x18], 0x6d4b28
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], 0x40
lea edi, [eax + ebp*4]
mov edx, dword [esp + 0x1c]
mov esi, dword [edx]
test esi, esi
je 0x47527b
lea eax, [esi + 0x258]
lea ecx, [esp + 0x44]
push eax
push 0x6a14c8
push ecx
call dword [fcn.0065f1cc]
mov edx, dword [esp + 0x88]
push ebx
lea eax, [esp + 0x54]
push edx
push eax
call dword [fcn.0065f208]
add esp, 0x18
test eax, eax
jne 0x475234
lea ecx, [esi + 0x7148]
inc ebp
mov dword [edi], ecx
add edi, 4
mov eax, dword [0x8267b4]
test eax, eax
je 0x47527b
lea edx, [esi + 0x320]
lea eax, [esp + 0x44]
push edx
push 0x69a740
push eax
call dword [fcn.0065f1cc]
mov ecx, dword [esp + 0x88]
push ebx
lea edx, [esp + 0x54]
push ecx
push edx
call dword [fcn.0065f208]
add esp, 0x18
test eax, eax
jne 0x47527b
add esi, 0x7080
inc ebp
mov dword [edi], esi
add edi, 4
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
add ecx, 4
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
jne 0x4751e8
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [0x827a60]
inc eax
add edx, 0x720
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
jl 0x4751ce
mov eax, dword [esp + 0x88]
mov edi, dword [esp + 0x10]
mov byte [esp + 0x24], 0x35
mov byte [esp + 0x26], 0
xor ebx, ebx
lea esi, [eax + ebp*4]
cmp ebx, dword [0x826804]
jge 0x47530f
mov edx, dword [esp + 0x7c]
mov cl, bl
push edi
lea eax, [esp + 0x28]
add cl, 0x31
push edx
push eax
mov byte [esp + 0x31], cl
call dword [fcn.0065f208]
add esp, 0xc
test eax, eax
jne 0x475309
lea ecx, [ebx + 0x7532]
inc ebp
mov dword [esi], ecx
add esi, 4
inc ebx
cmp ebx, 9
jl 0x4752d4
mov eax, dword [0x826804]
xor esi, esi
test eax, eax
jle 0x47535a
mov edx, dword [esp + 0x88]
mov ebx, 0x80a3b6
lea edi, [edx + ebp*4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x7c]
push eax
push ecx
push ebx
call dword [fcn.0065f1a8]
add esp, 0xc
test eax, eax
jne 0x47534d
lea edx, [esi + 0x7532]
inc ebp
mov dword [edi], edx
add edi, 4
mov eax, dword [0x826804]
inc esi
add ebx, 0x13
cmp esi, eax
jl 0x475329
mov eax, dword [0x826810]
xor ebx, ebx
test eax, eax
jle 0x4753b9
mov eax, dword [esp + 0x88]
xor esi, esi
lea edi, [eax + ebp*4]
mov ecx, dword [esp + 0x10]
mov eax, dword [0x82680c]
mov edx, dword [esp + 0x7c]
push ecx
push edx
lea ecx, [esi + eax]
push 5
push ecx
call dword [sym.imp.TGear.dll_GetPYStr]
add esp, 8
push eax
call dword [fcn.0065f1a8]
add esp, 0xc
test eax, eax
jne 0x4753a9
lea edx, [ebx + 0x77ee]
inc ebp
mov dword [edi], edx
add edi, 4
mov eax, dword [0x826810]
inc ebx
add esi, 0x2eed
cmp ebx, eax
jl 0x475371
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x47550d
mov eax, dword [esp + 0x88]
xor ebx, ebx
mov esi, 0x6a73c8
lea edi, [eax + ebp*4]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x7c]
push ecx
push edx
push esi
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x4753f9
lea eax, [ebx + 0x76c2]
inc ebp
mov dword [edi], eax
add edi, 4
add esi, 5
inc ebx
cmp esi, 0x6a7468
jl 0x4753d6
mov ecx, dword [esp + 0x88]
xor ebx, ebx
mov esi, 0x6a763c
lea edi, [ecx + ebp*4]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x7c]
push edx
push eax
push esi
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x475439
lea ecx, [ebx + 0x7726]
inc ebp
mov dword [edi], ecx
add edi, 4
add esi, 5
inc ebx
cmp esi, 0x6a7740
jl 0x475416
mov eax, dword [0x826808]
xor ebx, ebx
test eax, eax
jle 0x47549e
mov edx, dword [esp + 0x88]
mov esi, 0x7f66d8
lea edi, [edx + ebp*4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x7c]
push eax
push ecx
push 5
push esi
call dword [sym.imp.TGear.dll_GetPYStr]
add esp, 8
push eax
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x47548e
lea edx, [ebx + 0x778a]
inc ebp
mov dword [edi], edx
add edi, 4
mov eax, dword [0x826808]
inc ebx
add esi, 0x32b
cmp ebx, eax
jl 0x47545f
mov eax, dword [esp + 0x88]
xor esi, esi
lea edi, [eax + ebp*4]
mov ecx, dword [0x826824]
mov eax, dword [ecx + 0xc]
test eax, eax
jne 0x4754bb
xor edx, edx
jmp 0x4754d1
mov edx, dword [ecx + 0x10]
sub edx, eax
mov eax, 0x78787879
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp esi, edx
jge 0x47550d
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x7c]
push edx
push eax
push 5
push esi
call fcn.0043e4b0
push eax
call dword [sym.imp.TGear.dll_GetPYStr]
add esp, 8
push eax
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x47550a
lea ecx, [esi + 0x7852]
inc ebp
mov dword [edi], ecx
add edi, 4
inc esi
jmp 0x4754aa
mov eax, dword [0x826c18]
test eax, eax
je 0x4755a3
mov edx, dword [0x826818]
mov eax, 2
mov ecx, dword [edx + 0x8ca0]
mov edx, dword [0x6e75c8]
test edx, edx
mov dword [esp + 0x18], ecx
jne 0x475546
mov edx, dword [esp + 0x20]
test edx, edx
je 0x475546
mov eax, 5
cmp dword [esp + 0x10], eax
jl 0x4755a3
xor esi, esi
test ecx, ecx
jle 0x4755a3
mov eax, dword [esp + 0x88]
mov ebx, dword [esp + 0x84]
lea edi, [eax + ebp*4]
mov ecx, dword [0x826818]
push esi
call fcn.0044b9a0
test eax, eax
je 0x47559a
mov ecx, dword [esp + 0x7c]
push ecx
push eax
call dword [fcn.0065f1fc]
add esp, 8
test eax, eax
je 0x47559a
lea edx, [esi + 0x88b8]
inc ebp
mov dword [edi], edx
add edi, 4
cmp ebp, ebx
jge 0x475cbf
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
jl 0x475563
mov eax, dword [0x6e776e]
test eax, eax
jne 0x475c26
mov ecx, dword [0x826818]
push 0xa
call fcn.004474f0
mov ecx, dword [esp + 0x20]
movsx eax, ax
test ecx, ecx
mov dword [esp + 0x18], eax
je 0x4757fc
mov edi, dword [esp + 0x7c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x1c], 0
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x10]
and ecx, 3
cmp eax, 4
rep movsb byte es:[edi], byte [esi]
jne 0x475617
mov ecx, dword [esp + 0x7c]
lea edx, [esp + 0x44]
push ecx
push 0x6a14c0
push edx
jmp 0x47562f
cmp eax, 3
jne 0x4756a2
mov eax, dword [esp + 0x7c]
lea ecx, [esp + 0x44]
push eax
push 0x6a14b8
push ecx
call dword [fcn.0065f1cc]
lea edi, [esp + 0x50]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
xor esi, esi
not ecx
dec ecx
mov dword [esp + 0x1c], 1
test eax, eax
mov ebx, ecx
jle 0x4756a2
mov edx, dword [esp + 0x88]
lea edi, [edx + ebp*4]
mov ecx, dword [0x826818]
lea eax, [esp + 0x44]
push ebx
push eax
push esi
call fcn.004466b0
push eax
call dword [fcn.0065f1a8]
add esp, 0xc
test eax, eax
jne 0x475699
mov eax, dword [esp + 0x84]
mov dword [edi], esi
inc ebp
add edi, 4
cmp ebp, eax
jge 0x475cbf
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
jl 0x475664
mov eax, dword [esp + 0x18]
xor esi, esi
test eax, eax
mov dword [esp + 0x14], esi
jle 0x475779
mov ecx, dword [esp + 0x88]
lea edi, [ecx + ebp*4]
mov ecx, dword [0x826818]
push esi
call fcn.004466b0
test eax, eax
je 0x475768
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x475711
lea esi, [esp + 0x44]
mov ecx, eax
mov bl, byte [ecx]
mov dl, bl
cmp bl, byte [esi]
jne 0x475704
test dl, dl
je 0x475700
mov bl, byte [ecx + 1]
mov dl, bl
cmp bl, byte [esi + 1]
jne 0x475704
add ecx, 2
add esi, 2
test dl, dl
jne 0x4756e0
xor ecx, ecx
jmp 0x475709
sbb ecx, ecx
sbb ecx, 0xffffffff
mov esi, dword [esp + 0x14]
test ecx, ecx
je 0x475768
mov ecx, dword [esp + 0x10]
cmp ecx, 1
jne 0x47573b
mov dl, byte [eax]
mov eax, dword [esp + 0x7c]
cmp dl, byte [eax]
jne 0x475768
mov eax, dword [esp + 0x84]
mov dword [edi], esi
inc ebp
add edi, 4
cmp ebp, eax
jge 0x475cbf
jmp 0x475768
cmp ecx, 2
jl 0x475768
mov ecx, dword [esp + 0x7c]
push ecx
push eax
call dword [fcn.0065f1fc]
add esp, 8
test eax, eax
je 0x475768
mov eax, dword [esp + 0x84]
mov dword [edi], esi
inc ebp
add edi, 4
cmp ebp, eax
jge 0x475cbf
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
mov dword [esp + 0x14], esi
jl 0x4756be
mov eax, dword [esp + 0x80]
test eax, eax
je 0x475c26
mov eax, dword [0x828ad0]
test eax, eax
je 0x475c26
mov eax, dword [0x828ad4]
xor edi, edi
test eax, eax
jle 0x475c26
mov edx, dword [esp + 0x88]
xor ebx, ebx
lea esi, [edx + ebp*4]
mov ecx, dword [0x828ad0]
mov eax, dword [esp + 0x7c]
push eax
lea edx, [ebx + ecx]
push edx
call dword [fcn.0065f1fc]
add esp, 8
test eax, eax
je 0x4757e7
lea eax, [edi + 0xc350]
inc ebp
mov dword [esi], eax
mov eax, dword [esp + 0x84]
add esi, 4
cmp ebp, eax
jge 0x475cbf
mov eax, dword [0x828ad4]
inc edi
add ebx, 0x8a
cmp edi, eax
jl 0x4757b0
jmp 0x475c26
test eax, eax
mov dword [esp + 0x14], 0
jle 0x47598b
mov ecx, dword [esp + 0x88]
mov esi, dword [esp + 0x14]
lea ebx, [ecx + ebp*4]
mov ecx, dword [0x826818]
push esi
call fcn.004466b0
mov edi, eax
test edi, edi
mov dword [esp + 0x24], edi
je 0x47597a
push edi
call fcn.00473df0
add esp, 4
test eax, eax
jne 0x47597a
mov eax, dword [esp + 0x7c]
xor edx, edx
push 2
mov dword [esp + 0x34], edx
push eax
push 0x6a14b4
mov word [esp + 0x40], dx
mov byte [esp + 0x3c], 0x2a
call dword [fcn.0065f1a8]
add esp, 0xc
test eax, eax
jne 0x4758d4
mov edi, dword [esp + 0x7c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x30]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x28]
add ecx, 0xf1
push eax
push ecx
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x4758cc
mov edx, dword [esp + 0x14]
inc ebp
mov dword [ebx], edx
add ebx, 4
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
lea eax, [edi + 0xf1]
push 8
lea ecx, [esp + 0x3c]
push eax
push ecx
call dword [fcn.0065f1c4]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x88]
push edx
lea ecx, [esp + 0x48]
push eax
push ecx
mov byte [esp + 0x58], 0
call fcn.00474d20
add esp, 0x18
test eax, eax
jne 0x475922
mov eax, dword [esp + 0x84]
mov dword [ebx], esi
inc ebp
add ebx, 4
cmp ebp, eax
jge 0x475cbf
jmp 0x47597a
cmp dword [esp + 0x10], 2
jle 0x47594b
cmp byte [esp + 0x38], 0x4e
jne 0x47594b
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x7c]
push edx
lea ecx, [esp + 0x3d]
push eax
push ecx
call fcn.00474d20
add esp, 0xc
test eax, eax
je 0x47590b
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x7c]
push edx
add edi, 0x18
push eax
push edi
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x47597a
mov eax, dword [esp + 0x84]
mov dword [ebx], esi
inc ebp
add ebx, 4
cmp ebp, eax
jge 0x475cbf
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
mov dword [esp + 0x14], esi
jl 0x47581a
mov eax, dword [esp + 0x18]
xor edi, edi
test eax, eax
jle 0x475a0f
mov ecx, dword [esp + 0x88]
lea ebx, [ecx + ebp*4]
mov ecx, dword [0x826818]
push edi
call fcn.004466b0
mov esi, eax
test esi, esi
je 0x475a06
push esi
call fcn.00473df0
add esp, 4
test eax, eax
je 0x475a06
add esi, 0xf1
push 8
lea edx, [esp + 0x3c]
push esi
push edx
call dword [fcn.0065f1c4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x88]
push eax
push ecx
push esi
mov byte [esp + 0x58], 0
call fcn.00474d20
add esp, 0x18
test eax, eax
jne 0x475a06
mov eax, dword [esp + 0x84]
mov dword [ebx], edi
inc ebp
add ebx, 4
cmp ebp, eax
jge 0x475cbf
mov eax, dword [esp + 0x18]
inc edi
cmp edi, eax
jl 0x47599f
mov ecx, dword [esp + 0x80]
xor eax, eax
cmp ecx, eax
je 0x475b1f
cmp dword [0x828ad0], eax
je 0x475b1f
mov ecx, dword [0x828ad4]
mov dword [esp + 0x14], eax
cmp ecx, eax
jle 0x475b1f
mov edx, dword [esp + 0x88]
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x80], eax
lea eax, [edx + ebp*4]
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x80]
mov eax, dword [0x828ad0]
xor ecx, ecx
mov dword [esp + 0x58], ecx
lea edi, [edx + eax + 7]
mov dword [esp + 0x5c], ecx
xor eax, eax
mov dword [esp + 0x60], ecx
lea edx, [esp + 0x58]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], ecx
push ecx
push ebx
lea ecx, [esp + 0x60]
push 9
push ecx
call dword [sym.imp.TGear.dll_GetPYStr]
add esp, 8
push eax
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x475af4
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
add edx, 0xc350
inc ebp
mov dword [eax], edx
add eax, 4
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x84]
cmp ebp, eax
jge 0x475cbf
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x80]
mov ecx, dword [0x828ad4]
inc eax
add edx, 0x8a
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x80], edx
jl 0x475a57
mov ecx, dword [0x826818]
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 0
call fcn.004477e0
test eax, eax
mov dword [esp + 0x24], eax
jle 0x475c26
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x475c26
xor ebx, ebx
test eax, eax
jle 0x475c26
mov ecx, dword [esp + 0x88]
xor edi, edi
lea edx, [ecx + ebp*4]
mov dword [esp + 0x80], edx
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x7c]
push eax
push ecx
lea eax, [edi + edx + 8]
push 5
push eax
call dword [sym.imp.TGear.dll_GetPYStr]
add esp, 8
push eax
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x475c16
mov eax, dword [esp + 0x1c]
movsx cx, byte [edi + eax]
lea edx, [edi + eax + 1]
push ecx
mov ecx, dword [0x826818]
push edx
call fcn.004467b0
test eax, eax
je 0x475c16
lea esi, [eax + 0x18]
mov eax, dword [esp + 0x1c]
lea eax, [edi + eax + 8]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x475be4
test cl, cl
je 0x475be0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x475be4
add eax, 2
add esi, 2
test cl, cl
jne 0x475bc0
xor eax, eax
jmp 0x475be9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x475c16
mov eax, dword [esp + 0x80]
lea ecx, [ebx + 0x2710]
inc ebp
mov dword [eax], ecx
add eax, 4
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x84]
cmp ebp, eax
jge 0x475cbf
mov eax, dword [esp + 0x24]
inc ebx
add edi, 0x40
cmp ebx, eax
jl 0x475b6c
mov eax, dword [0x826c18]
test eax, eax
je 0x475cbf
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x475cbf
cmp dword [esp + 0x10], 1
jle 0x475cbf
mov edx, dword [0x826818]
xor esi, esi
mov eax, dword [edx + 0x8ca0]
test eax, eax
mov dword [esp + 0x18], eax
jle 0x475cbf
mov eax, dword [esp + 0x88]
mov ebx, dword [esp + 0x84]
lea edi, [eax + ebp*4]
mov ecx, dword [0x826818]
push esi
call fcn.0044b9a0
test eax, eax
je 0x475cb6
mov ecx, dword [esp + 0x10]
cmp ecx, 8
jle 0x475c8b
mov ecx, 8
push ecx
mov ecx, dword [esp + 0x80]
add eax, 0xf1
push ecx
push eax
call fcn.00474d20
add esp, 0xc
test eax, eax
jne 0x475cb6
lea edx, [esi + 0x88b8]
inc ebp
mov dword [edi], edx
add edi, 4
cmp ebp, ebx
jge 0x475cbf
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
jl 0x475c6d
mov ecx, dword [esp + 0x6c]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x68
ret