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

Disassembly:
push 0xffffffffffffffff
push 0x4b0a81
mov eax, dword fs:[0]
push eax
sub esp, 0x338
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4dd704]
xor eax, esp
push eax
lea eax, [esp + 0x34c]
mov dword fs:[0], eax
mov edi, dword [esp + 0x35c]
mov ebp, dword [edi]
mov eax, dword [esp + 0x360]
mov dword [eax], 0
mov eax, dword [esp + 0x364]
xor ecx, ecx
xor edx, edx
mov dword [eax], ecx
xor esi, esi
xor ebx, ebx
mov dword [eax + 4], edx
mov dword [eax + 8], esi
mov dword [eax + 0xc], ebx
cmp ebp, esi
je 0x477cd9
mov eax, dword [ebp + 4]
cmp eax, esi
je 0x477cd9
mov ecx, dword [ebp]
cmp ecx, esi
je 0x477cd9
mov edx, dword [ebp + 8]
imul ecx, eax
lea eax, [ecx + edx*2 + 4]
add eax, eax
add eax, eax
mov dword [esp + 0x24], ecx
cmp eax, dword [edi + 4]
ja 0x477cd9
mov edx, dword [esp + 0x368]
mov eax, dword [edx]
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], esi
cmp eax, esi
je 0x477029
mov edx, dword [edx + 4]
add ecx, ecx
add ecx, ecx
cmp edx, ecx
jne 0x477092
mov dword [esp + 0x30], eax
cmp eax, esi
je 0x477029
push ecx
push esi
push eax
call fcn.0049c630
add esp, 0xc
mov ecx, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0x34], edi
test ecx, ecx
jbe 0x477237
xor edx, edx
mov dword [esp + 0x1c], edx
cmp edi, ecx
jae 0x477060
mov eax, dword [ebp]
imul eax, dword [ebp + 4]
lea eax, [ebp + eax*4 + 0x10]
mov edx, dword [eax + edi*8 + 4]
mov dword [esp + 0x1c], edx
lea edx, [eax + ecx*8]
mov eax, dword [eax + edi*8]
lea edx, [edx + eax*8]
mov esi, dword [esp + 0x35c]
mov eax, dword [esi]
mov esi, dword [esi + 4]
mov ebx, dword [esp + 0x1c]
lea ebx, [edx + ebx*8]
add esi, eax
cmp ebx, esi
ja 0x47724b
lea esi, [edi + 1]
mov dword [esp + 0x58], esi
cmp esi, ecx
jae 0x4770cf
xor ebx, ebx
cmp esi, ecx
jb 0x47709c
xor eax, eax
jmp 0x4770b4
mov dword [esp + 0x14], 4
jmp 0x477029
mov eax, dword [ebp]
imul eax, dword [ebp + 4]
lea eax, [ebp + eax*4 + 0x10]
mov ebx, dword [eax + esi*8 + 4]
lea edi, [eax + ecx*8]
mov eax, dword [eax + esi*8]
lea eax, [edi + eax*8]
lea edi, [eax + ebx*8]
cmp edi, edx
jbe 0x4770ca
mov edi, dword [esp + 0x1c]
lea ebx, [edx + edi*8]
cmp eax, ebx
jb 0x47724b
inc esi
cmp esi, ecx
jb 0x477088
xor esi, esi
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x20], esi
cmp dword [esp + 0x1c], ecx
jbe 0x477147
mov ebx, dword [ebp + 4]
cmp dword [edx + ecx*8 + 4], ebx
jae 0x47721c
mov eax, dword [edx + ecx*8]
cmp eax, dword [ebp]
jae 0x47721c
imul eax, ebx
add eax, dword [edx + ecx*8 + 4]
mov eax, dword [ebp + eax*4 + 0x10]
cmp eax, 0xfff00000
jb 0x47710f
movzx esi, ax
jmp 0x477112
or esi, 0xffffffff
cmp dword [esp + 0x34], esi
jne 0x47713c
cmp eax, 0xfff00000
jb 0x47713c
add eax, 0x100000
shr eax, 0x10
test eax, eax
jl 0x47713c
cmp eax, 1
jle 0x47713b
cmp eax, 2
jne 0x47713c
inc dword [esp + 0x20]
jmp 0x47713c
inc edi
inc ecx
cmp ecx, dword [esp + 0x1c]
jb 0x4770e2
mov esi, dword [esp + 0x20]
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x20], eax
cmp edi, 1
jbe 0x47715d
mov eax, 0x100
mov dword [esp + 0x20], eax
cmp esi, 1
jbe 0x477167
mov ebx, 0x100
test esi, esi
jbe 0x477175
test edi, edi
jne 0x477175
or ebx, 0x200
mov ecx, ebx
or ecx, eax
or dword [esp + 0x14], ecx
cmp dword [esp + 0x30], 0
je 0x477224
cmp dword [esp + 0x20], 0
jne 0x477197
test ebx, ebx
je 0x477224
xor eax, eax
cmp dword [esp + 0x1c], eax
jbe 0x477224
mov edi, dword [esp + 0x30]
mov ecx, dword [edx + eax*8]
imul ecx, dword [ebp + 4]
add ecx, dword [edx + eax*8 + 4]
mov ecx, dword [ebp + ecx*4 + 0x10]
cmp ecx, 0xfff00000
jb 0x4771c3
movzx esi, cx
jmp 0x4771c6
or esi, 0xffffffff
cmp dword [esp + 0x34], esi
jne 0x477213
cmp ecx, 0xfff00000
jb 0x477213
add ecx, 0x100000
shr ecx, 0x10
test ecx, ecx
jl 0x477213
cmp ecx, 1
jle 0x4771fe
cmp ecx, 2
jne 0x477213
mov ecx, dword [edx + eax*8]
imul ecx, dword [ebp + 4]
add ecx, dword [edx + eax*8 + 4]
or dword [edi + ecx*4], ebx
lea ecx, [edi + ecx*4]
jmp 0x477213
mov ecx, dword [edx + eax*8]
imul ecx, dword [ebp + 4]
add ecx, dword [edx + eax*8 + 4]
mov esi, dword [esp + 0x20]
or dword [edi + ecx*4], esi
lea ecx, [edi + ecx*4]
inc eax
cmp eax, dword [esp + 0x1c]
jb 0x4771a7
jmp 0x477224
or dword [esp + 0x14], 0x1000
mov edi, dword [esp + 0x58]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x34], edi
cmp edi, ecx
jb 0x47703a
mov ebx, dword [ebp + 4]
test ebx, ebx
je 0x477255
push ebx
call fcn.0049badd
add esp, 4
mov edi, eax
jmp 0x477257
mov eax, 2
jmp 0x477cde
xor edi, edi
mov esi, edi
neg esi
sbb esi, esi
and esi, ebx
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], esi
mov ebx, dword [esp + 0x24]
add ebx, ebx
xor eax, eax
add ebx, ebx
mov dword [esp + 0x354], eax
cmp ebx, eax
je 0x47728b
push ebx
call fcn.0049badd
add esp, 4
mov dword [esp + 0x3c], eax
jmp 0x47728f
mov dword [esp + 0x3c], eax
mov edx, eax
neg edx
sbb edx, edx
and edx, ebx
mov dword [esp + 0x40], edx
mov byte [esp + 0x354], 1
test edi, edi
je 0x477cbb
test eax, eax
je 0x477ccc
push esi
xor esi, esi
push esi
push edi
call fcn.0049c630
add esp, 0xc
cmp dword [esp + 0x24], esi
jbe 0x4772d2
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x3c]
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, 1
mov dword [esp + 0x80], esi
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], esi
mov dword [esp + 0x1c], edi
lea esi, [esp + 0x144]
xor eax, eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 4], eax
lea eax, [esi - 0x28]
push eax
lea ecx, [esp + 0x80]
push ecx
mov dword [esp + 0x84], edi
call fcn.00475360
add esp, 8
mov byte [esi], al
test al, al
je 0x4774af
mov edx, dword [ebp + 4]
cmp edx, dword [esi - 0x20]
jae 0x477337
mov byte [esi], 0
jmp 0x4774af
test al, al
je 0x4774af
cmp byte [esi - 0x1c], 0
je 0x477356
test dword [ebp + 4], 1
jne 0x477356
mov byte [esi], 0
jmp 0x4774af
test al, al
je 0x4774af
cmp byte [esi - 0x1b], 0
je 0x477377
mov ecx, dword [ebp + 4]
and ecx, 1
cmp cl, 1
jne 0x477377
mov byte [esi], 0
jmp 0x4774af
test al, al
je 0x4774af
cmp edi, 5
je 0x47738e
cmp edi, 7
je 0x47738e
cmp edi, 8
jne 0x477398
or eax, 0xffffffff
or ecx, 0xffffffff
xor ebx, ebx
jmp 0x4773a1
xor ebx, ebx
mov eax, 1
xor ecx, ecx
cmp byte [esi - 0x10], 0
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
je 0x4773b3
cmp byte [esi - 0xf], 0
jne 0x4773b6
mov byte [esi], 0
lea edx, [esp + 0xac]
push edx
lea eax, [esp + 0xa0]
push eax
mov dword [esp + 0xa4], edi
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], ebx
call fcn.00475360
add esp, 8
test al, al
jne 0x47742c
xor eax, eax
mov edi, eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
jmp 0x47743a
mov edi, dword [esp + 0xb0]
mov eax, dword [esp + 0xac]
mov ebx, eax
cmp eax, edi
ja 0x4774ab
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
lea edx, [esp + 0xac]
push edx
lea eax, [esp + 0x70]
push eax
mov dword [esp + 0x78], ebx
call fcn.00475360
add esp, 8
test al, al
je 0x4774a6
mov eax, dword [ebp + 4]
cmp eax, dword [esp + 0xb4]
jb 0x4774a6
cmp byte [esp + 0xb8], 0
je 0x477489
test al, 1
je 0x4774a6
cmp byte [esp + 0xb9], 0
je 0x47749a
and eax, 1
cmp al, 1
je 0x4774a6
mov edx, 1
mov ecx, ebx
shl edx, cl
or dword [esi + 4], edx
inc ebx
cmp ebx, edi
jbe 0x477452
mov edi, dword [esp + 0x1c]
inc edi
add esi, 0x38
mov dword [esp + 0x1c], edi
cmp edi, 0xb
jb 0x4772f7
xor eax, eax
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov byte [esp + 0x354], 2
mov dword [esp + 0x1c], eax
cmp dword [ebp], eax
jbe 0x477965
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
xor esi, esi
push eax
push esi
push ecx
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x40], esi
mov byte [esp + 0x37], 0
call fcn.0049c630
mov edx, dword [esp + 0x2c]
mov eax, dword [ebp + 4]
inc edx
add esp, 0xc
mov dword [esp + 0x60], edx
mov dword [esp + 0x2c], esi
cmp eax, esi
jbe 0x4777fe
nop
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x2c]
imul eax, esi
add eax, edi
mov eax, dword [ebp + eax*4 + 0x10]
mov dword [esp + 0x58], eax
cmp eax, 0xfff00000
jb 0x477594
movzx ecx, ax
cmp ecx, 0xfff0
jae 0x477594
cmp ecx, dword [ebp + 8]
mov ecx, dword [esp + 0x30]
jb 0x47757e
or dword [esp + 0x14], 0x80
test ecx, ecx
je 0x47757e
mov edx, dword [ebp + 4]
imul edx, esi
add edx, edi
or dword [ecx + edx*4], 0x80
lea edx, [ecx + edx*4]
add eax, 0x100000
shr eax, 0x10
add eax, 0xfff0
shl eax, 0x10
mov dword [esp + 0x58], eax
jmp 0x477598
mov ecx, dword [esp + 0x30]
cmp eax, 0xffefff00
jae 0x47760a
cmp eax, dword [esp + 0x24]
jae 0x4775d0
mov edx, dword [esp + 0x20]
lea ecx, [eax + 1]
inc edx
cmp edx, ecx
jbe 0x4775b3
mov ecx, edx
dec ecx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x3c]
cmp dword [ecx + eax*4], 0
jne 0x4775cb
mov edx, dword [esp + 0x360]
inc dword [edx]
inc dword [ecx + eax*4]
jmp 0x4775e8
or dword [esp + 0x14], 0x10
test ecx, ecx
je 0x4775e8
mov edx, dword [ebp + 4]
imul edx, esi
add edx, edi
or dword [ecx + edx*4], 0x10
lea ecx, [ecx + edx*4]
mov ecx, dword [esp + 0x60]
cmp eax, ecx
jb 0x477605
mov edx, dword [ebp + 4]
add edx, ecx
cmp eax, edx
jae 0x477605
mov edx, dword [esp + 0x64]
sub edx, ecx
mov byte [edx + eax], 1
jmp 0x47760a
mov byte [esp + 0x2b], 1
cmp eax, 0xfff0fff0
jne 0x477617
inc dword [esp + 0x4c]
jmp 0x47762f
cmp eax, 0xfff1fff0
jne 0x477624
inc dword [esp + 0x48]
jmp 0x47762f
cmp eax, 0xfff2fff0
jne 0x47762f
inc dword [esp + 0x34]
cmp dword [esp + 0x14], 0
jne 0x4777ea
lea esi, [esp + 0x148]
mov dword [esp + 0x54], 1
mov dword [esp + 0x18], esi
lea ecx, [ecx]
mov eax, dword [esp + 0x54]
xor edi, edi
mov dword [esp + 0x44], edi
cmp eax, 5
je 0x477669
cmp eax, 7
je 0x477669
cmp eax, 8
jne 0x4776b3
mov dword [esp + 0xd4], eax
mov eax, dword [ebp + 4]
push eax
lea ecx, [esp + 0xd8]
push ecx
mov dword [esp + 0xe0], edi
mov dword [esp + 0xe4], edi
mov dword [esp + 0xe8], edi
call fcn.00475590
mov ecx, eax
add esp, 8
cmp ecx, edi
jbe 0x4776af
mov eax, dword [ebp]
xor edx, edx
div ecx
mov dword [esp + 0x44], eax
cmp eax, 2
jae 0x4776b3
mov dword [esp + 0x44], edi
mov edx, dword [esi]
xor ecx, ecx
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x50], edx
mov edi, 1
shl edi, cl
xor ebx, ebx
mov dword [esp + 0xa0], ebx
test dword [esp + 0x50], edi
je 0x47779d
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x5c]
xor esi, esi
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ecx
lea ecx, [ecx]
xor edx, edx
cmp edx, esi
mov edx, dword [esp + 0x2c]
sbb eax, eax
and eax, dword [esp + 0x44]
lea ecx, [esp + 0x7c]
push ecx
mov ecx, dword [ebp + 4]
push edx
mov edx, dword [ebp]
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x24]
push eax
push ecx
push edx
lea eax, [esp + 0xa0]
push eax
mov dword [esp + 0xb0], esi
call fcn.00476290
add esp, 0x18
cmp eax, 0xffefff01
je 0x47776a
cmp eax, 0xffefff02
je 0x47776a
cmp dword [esp + 0x58], eax
jne 0x47776a
mov eax, 1
xor edx, edx
mov ecx, esi
call fcn.0049cdd0
or ebx, eax
or dword [esp + 0xa0], edx
inc esi
cmp esi, dword [esp + 0x44]
jbe 0x477700
test ebx, ebx
jne 0x477786
cmp dword [esp + 0xa0], ebx
jne 0x477786
not edi
and dword [esp + 0x50], edi
jmp 0x477799
mov ecx, dword [esp + 0xa0]
inc dword [esp + 0x38]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ecx
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x5c]
inc ecx
mov dword [esp + 0x5c], ecx
cmp ecx, 0x20
jb 0x4776cb
cmp dword [esp + 0x38], 1
mov eax, dword [esp + 0x50]
mov dword [esi], eax
jne 0x4777ca
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x70]
and dword [esi + 4], edx
and dword [esi + 8], ecx
test eax, eax
jne 0x4777d1
mov byte [esi - 4], al
mov eax, dword [esp + 0x54]
inc eax
add esi, 0x38
mov dword [esp + 0x54], eax
mov dword [esp + 0x18], esi
cmp eax, 0xb
jb 0x477650
mov ecx, dword [esp + 0x2c]
mov eax, dword [ebp + 4]
inc ecx
mov dword [esp + 0x2c], ecx
cmp ecx, eax
jb 0x477530
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
xor edx, edx
add eax, ecx
xor ebx, ebx
mov dword [esp + 0x18], edx
cmp eax, 1
jbe 0x47781a
mov ebx, 0x100
mov ecx, dword [esp + 0x34]
cmp ecx, 1
jbe 0x47782c
mov edx, 0x100
mov dword [esp + 0x18], edx
test ecx, ecx
jbe 0x47783e
test eax, eax
jne 0x47783e
or edx, 0x200
mov dword [esp + 0x18], edx
mov edi, dword [esp + 0x30]
mov eax, edx
or eax, ebx
or dword [esp + 0x14], eax
test edi, edi
je 0x4778ab
test ebx, ebx
jne 0x477856
test edx, edx
je 0x4778ab
mov eax, dword [ebp + 4]
xor ecx, ecx
test eax, eax
jbe 0x4778ab
mov esi, dword [esp + 0x1c]
imul eax, esi
add eax, ecx
mov eax, dword [ebp + eax*4 + 0x10]
cmp eax, 0xfff0fff0
je 0x47787a
cmp eax, 0xfff1fff0
jne 0x47788c
mov edx, dword [ebp + 4]
imul edx, esi
add edx, ecx
or dword [edi + edx*4], ebx
lea edx, [edi + edx*4]
mov edx, dword [esp + 0x18]
cmp eax, 0xfff2fff0
jne 0x4778a1
mov eax, dword [ebp + 4]
imul eax, esi
add eax, ecx
or dword [edi + eax*4], edx
lea eax, [edi + eax*4]
mov eax, dword [ebp + 4]
inc ecx
cmp ecx, eax
jb 0x477863
jmp 0x4778af
mov esi, dword [esp + 0x1c]
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x135]
mov dword [esp + 0x18], 1
mov dword [esp + 0x2c], eax
xor edx, edx
cmp byte [eax - 1], dl
je 0x4778d7
cmp byte [esp + 0x2b], dl
je 0x4778d7
mov edx, 0x80000
cmp byte [eax], 0
je 0x4778fd
mov ebx, dword [esp + 0x4c]
cmp dword [eax + 3], ebx
jne 0x4778f7
mov ebx, dword [esp + 0x48]
cmp dword [eax + 7], ebx
jne 0x4778f7
mov ebx, dword [esp + 0x34]
cmp dword [eax + 0xb], ebx
je 0x4778fd
or edx, 0x40000
test edx, edx
je 0x47793e
mov ebx, dword [esp + 0x36c]
test ebx, ebx
je 0x47793a
cmp ebx, dword [esp + 0x18]
jne 0x477936
or dword [esp + 0x14], edx
test edi, edi
je 0x477936
xor eax, eax
test ecx, ecx
jbe 0x477936
mov ecx, dword [ebp + 4]
imul ecx, esi
add ecx, eax
or dword [edi + ecx*4], edx
lea ecx, [edi + ecx*4]
mov ecx, dword [ebp + 4]
inc eax
cmp eax, ecx
jb 0x477920
mov eax, dword [esp + 0x2c]
mov byte [eax + 0xf], 0
mov edx, dword [esp + 0x18]
inc edx
add eax, 0x38
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], eax
cmp edx, 0xb
jb 0x4778c5
inc esi
mov dword [esp + 0x1c], esi
cmp esi, dword [ebp]
jb 0x4774f1
mov edx, dword [esp + 0x360]
mov ecx, dword [esp + 0x20]
mov eax, dword [edx]
inc ecx
cmp ecx, eax
je 0x47797c
or dword [esp + 0x14], 0x40
mov ecx, dword [esp + 0x24]
cmp ecx, eax
jae 0x47798c
mov edi, ecx
mov dword [esp + 0x24], edi
jmp 0x477992
mov edi, eax
mov dword [esp + 0x24], eax
xor ecx, ecx
xor edx, edx
xor ebx, ebx
xor eax, eax
cmp edi, 2
jl 0x4779b8
lea esi, [edi - 1]
mov edi, dword [esp + 0x3c]
add ecx, dword [edi + eax*4]
add edx, dword [edi + eax*4 + 4]
add eax, 2
cmp eax, esi
jb 0x4779a2
mov edi, dword [esp + 0x24]
cmp eax, edi
jae 0x4779c3
mov esi, dword [esp + 0x3c]
mov ebx, dword [esi + eax*4]
add ecx, edx
add ebx, ecx
test edi, edi
jbe 0x4779d7
mov eax, edi
shr eax, 1
add eax, ebx
xor edx, edx
div edi
mov ebx, eax
xor esi, esi
test edi, edi
mov edi, dword [esp + 0x30]
jbe 0x477a3f
mov edx, dword [esp + 0x3c]
cmp ebx, dword [edx + esi*4]
je 0x477a38
or dword [esp + 0x14], 0x20
test edi, edi
je 0x477af5
xor edx, edx
cmp dword [ebp], edx
jbe 0x477a38
mov eax, dword [ebp + 4]
xor ecx, ecx
test eax, eax
jbe 0x477a32
jmp 0x477a10
imul eax, edx
add eax, ecx
cmp dword [ebp + eax*4 + 0x10], esi
jne 0x477a2a
mov eax, dword [ebp + 4]
imul eax, edx
add eax, ecx
or dword [edi + eax*4], 0x20
lea eax, [edi + eax*4]
mov eax, dword [ebp + 4]
inc ecx
cmp ecx, eax
jb 0x477a10
inc edx
cmp edx, dword [ebp]
jb 0x477a02
inc esi
cmp esi, dword [esp + 0x24]
jb 0x4779e5
test edi, edi
je 0x477af5
test byte [esp + 0x14], 0x40
je 0x477af5
mov ecx, dword [esp + 0x24]
test ecx, ecx
jbe 0x477af5
test ebx, ebx
jbe 0x477af5
xor ebx, ebx
or esi, 0xffffffff
xor al, al
mov dword [esp + 0x18], ebx
test ecx, ecx
jbe 0x477af5
lea esp, [esp]
mov edx, dword [esp + 0x3c]
cmp dword [edx + ebx*4], 0
ja 0x477a91
mov al, 1
jmp 0x477aec
test al, al
je 0x477ae4
cmp esi, 0xffffffff
je 0x477ae4
xor edx, edx
cmp dword [ebp], edx
jbe 0x477ae4
mov eax, dword [ebp + 4]
xor ecx, ecx
test eax, eax
jbe 0x477ade
lea ebx, [ebx]
imul eax, edx
add eax, ecx
mov eax, dword [ebp + eax*4 + 0x10]
cmp eax, esi
je 0x477ac3
cmp eax, dword [esp + 0x18]
jne 0x477ad2
mov eax, dword [ebp + 4]
imul eax, edx
add eax, ecx
or dword [edi + eax*4], 0x40
lea eax, [edi + eax*4]
mov eax, dword [ebp + 4]
inc ecx
cmp ecx, eax
jb 0x477ab0
mov ebx, dword [esp + 0x18]
inc edx
cmp edx, dword [ebp]
jb 0x477aa1
mov ecx, dword [esp + 0x24]
xor al, al
mov esi, ebx
inc ebx
mov dword [esp + 0x18], ebx
cmp ebx, ecx
jb 0x477a80
cmp dword [esp + 0x14], 0
jne 0x477c8d
mov esi, dword [esp + 0x36c]
mov edi, dword [esp + 0x3c]
mov ecx, 1
lea edx, [esp + 0x12c]
mov eax, dword [edx]
test eax, eax
je 0x477b35
cmp eax, dword [edi]
je 0x477b35
test esi, esi
je 0x477b31
cmp esi, ecx
jne 0x477b31
or dword [esp + 0x14], 0x100000
mov byte [edx + 0x18], 0
inc ecx
add edx, 0x38
cmp ecx, 0xb
jb 0x477b17
cmp dword [esp + 0x14], 0
jne 0x477c8d
mov eax, dword [esp + 0x364]
cmp dword [eax], 0
mov dword [esp + 0x18], 1
jne 0x477c67
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x14c]
mov dword [esp + 0x38], ecx
mov edx, ecx
cmp esi, 0xb
jae 0x477c67
mov edi, dword [edx - 4]
xor ecx, ecx
mov ebx, 1
shl ebx, cl
test edi, ebx
jne 0x477b96
inc ecx
cmp ecx, 0x20
jb 0x477b80
jmp 0x477c43
mov edi, dword [edx + 4]
mov ebx, dword [edx]
mov dword [eax], esi
mov dword [eax + 4], ecx
xor eax, eax
cmp edi, eax
ja 0x477baf
cmp ebx, 1
jbe 0x477c43
cmp esi, 5
je 0x477bc2
cmp esi, 7
je 0x477bc2
cmp esi, 8
jne 0x477c43
mov edx, dword [ebp + 4]
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
push edx
lea eax, [esp + 0x90]
push eax
mov dword [esp + 0x94], esi
call fcn.00475590
mov ecx, eax
add esp, 8
test ecx, ecx
jbe 0x477c43
mov eax, dword [ebp]
xor edx, edx
div ecx
mov dword [esp + 0x60], eax
cmp eax, 2
jb 0x477c43
test eax, eax
jbe 0x477c43
xor esi, esi
mov edi, edi
mov eax, 1
xor edx, edx
mov ecx, esi
call fcn.0049cdd0
and eax, ebx
and edx, edi
or eax, edx
jne 0x477c2e
inc esi
cmp esi, 0x40
jb 0x477c10
jmp 0x477c43
test esi, esi
jbe 0x477c43
mov eax, dword [esp + 0x364]
mov ecx, dword [esp + 0x60]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], esi
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x364]
inc esi
add edx, 0x38
cmp dword [eax], 0
mov dword [esp + 0x18], esi
mov dword [esp + 0x38], edx
je 0x477b72
cmp dword [eax], 0
mov ecx, 1
jne 0x477c8d
lea edx, [esp + 0x144]
cmp ecx, 0xb
jae 0x477c8d
cmp byte [edx], 0
je 0x477c84
mov dword [eax], ecx
inc ecx
add edx, 0x38
cmp dword [eax], 0
je 0x477c78
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x477c9e
push eax
call fcn.0049ba00
add esp, 4
mov edx, dword [esp + 0x3c]
push edx
call fcn.0049ba00
mov eax, dword [esp + 0x68]
push eax
call fcn.0049ba00
mov eax, dword [esp + 0x1c]
add esp, 8
jmp 0x477cde
test eax, eax
je 0x477ccc
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.0049ba00
add esp, 4
test edi, edi
je 0x477cd9
push edi
call fcn.0049ba00
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x34c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x344
ret