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

Disassembly:
sub esp, 0x128
mov edx, dword [esp + 0x12c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x144]
mov ecx, dword [esi + 0x884]
or eax, 0xffffffff
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x4c]
push 0x178
push edx
mov dword [esp + 0x60], eax
mov dword [esp + 0x1c], ecx
call fcn.0046cb90
mov ebp, eax
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x1c], ebp
call fcn.00464ab0
mov ebx, dword [esp + 0x150]
add esp, 0xc
test ebx, ebx
jge 0x47f2c0
mov edi, dword [esp + 0x140]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, dword [esp + 0x13c]
push ecx
call fcn.0040c4a0
mov eax, dword [esi + 0xc]
add esp, 4
test eax, eax
mov dword [esp + 0x20], 1
je 0x47f2eb
mov edx, dword [eax + 8]
mov eax, dword [edx + 4]
mov dword [esp + 0x44], eax
jmp 0x47f2f3
mov dword [esp + 0x44], 0
mov edi, dword [esp + 0x140]
mov eax, dword [esp + 0x13c]
mov ecx, dword [esi + 0x888]
mov edx, dword [esi + 0x894]
push ebp
push 0
push ebx
push edi
push eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x50], ebx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x40], edx
call fcn.0047c6b0
add esp, 0x14
test eax, eax
jne 0x47fd2f
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x47fcc1
mov eax, dword [esp + 0x20]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x34], ebx
jne 0x47f3b8
mov ecx, dword [esi + 0x4c]
cmp ecx, dword [esi + 0x50]
jne 0x47f35d
push esi
call fcn.00481330
add esp, 4
mov edx, dword [esi + 0x4c]
mov byte [edx], 3
mov edi, dword [esi + 0x4c]
inc edi
mov dword [esi + 0x4c], edi
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b4268]
test eax, eax
mov ecx, edi
je 0x47f39f
cmp eax, 0x80000000
jne 0x47f38d
mov eax, 1
jmp 0x47f39c
test eax, eax
jge 0x47f39c
mov edx, dword [esi + 0x20]
cmp dword [esi + 0x1c], edx
jge 0x47f39c
mov dword [esi + 0x1c], edx
add dword [esi + 0x20], eax
mov eax, dword [esi + 0x48]
mov edi, dword [esp + 0x30]
mov edx, dword [esi + 0x78]
sub ecx, eax
mov eax, dword [esp + 0x28]
sub ecx, edi
shl eax, 4
mov dword [edx + eax + 4], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax - 1]
cmp dword [ebp + 0x30], edx
mov dword [esp + 0x20], eax
jne 0x47f3d0
dec eax
mov dword [esp + 0x20], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
xor ecx, ecx
test edx, edx
jle 0x47f3fd
cmp dword [eax], 0x100
je 0x47f3f4
mov edi, dword [eax + 0xc]
inc ecx
inc edi
shl edi, 4
add eax, edi
cmp ecx, edx
jl 0x47f3dc
jmp 0x47f3fd
mov ebx, 1
mov dword [esp + 0x34], ebx
mov edi, dword [esi + 0x10]
mov edx, dword [esi + 0x48]
inc edi
mov eax, edi
lea ecx, [eax - 1]
mov eax, dword [esi + 0x4c]
sub eax, edx
mov edx, dword [esi + 4]
push eax
mov dword [esp + 0x34], eax
mov dword [esi + 0x10], edi
mov eax, dword [ebp + 8]
sub eax, edx
push eax
push ecx
push esi
mov dword [esp + 0x38], ecx
call fcn.004813c0
add esp, 0x10
test ebx, ebx
je 0x47f47e
mov ecx, dword [esi + 0x4c]
cmp ecx, dword [esi + 0x50]
jne 0x47f442
push esi
call fcn.00481330
add esp, 4
mov edx, dword [esi + 0x4c]
mov byte [edx], 0x64
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b4b80]
test eax, eax
je 0x47f47e
cmp eax, 0x80000000
jne 0x47f46c
mov eax, 1
jmp 0x47f47b
test eax, eax
jge 0x47f47b
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47f47b
mov dword [esi + 0x1c], ecx
add dword [esi + 0x20], eax
mov edi, dword [esp + 0x10]
mov eax, dword [edi + 8]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00404b80
mov eax, dword [edi + 8]
sub eax, dword [esi + 4]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00404ba0
mov edx, dword [esp + 0x44]
mov eax, dword [edi + 8]
mov ebx, dword [esp + 0x2c]
push esi
lea ecx, [esp + 0x78]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [edi + 0x10]
push ecx
mov ecx, dword [edi + 0xc]
push edx
mov edx, dword [edi + 0x14]
push ecx
push eax
push edx
sub eax, dword [esi + 4]
push eax
push ebx
call fcn.004814e0
mov eax, dword [ebx + 0x14]
mov ecx, dword [edi + 0x10]
mov ebp, dword [edi + 0x14]
add esp, 0x40
dec eax
xor ebx, ebx
test ecx, ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x50], ebp
jle 0x47fa81
shl eax, 4
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0xc]
mov eax, dword [esp + 0x40]
mov edx, dword [edx + eax + 8]
mov edx, dword [edx + ebx*4]
mov dword [esi + 0x888], edx
mov ecx, dword [ecx + 0xc]
mov edx, dword [ecx + eax + 0xc]
mov eax, dword [edx + ebx*4]
mov dword [esi + 0x894], eax
cmp dword [ebp], 2
je 0x47f5f5
mov ecx, dword [ebp + 0xc]
mov eax, dword [esp + 0x13c]
push esi
push ecx
lea edx, [ebp + 0x10]
push edx
push eax
call fcn.0047fea0
mov eax, dword [ebp]
add esp, 0x10
cmp eax, 0x100
jne 0x47fa64
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x50]
add ecx, 5
cmp ecx, eax
jbe 0x47f572
push esi
call fcn.00481330
add esp, 4
mov edx, dword [esi + 0x4c]
mov byte [edx], 0x65
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x20]
inc eax
mov dword [esi + 0x4c], eax
shr ecx, 0x18
mov byte [eax], cl
mov edx, dword [esi + 0x4c]
inc edx
mov dword [esi + 0x4c], edx
mov eax, edx
mov edx, dword [esi + 0x20]
shr edx, 0x10
mov byte [eax], dl
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x20]
inc eax
mov dword [esi + 0x4c], eax
shr ecx, 8
mov byte [eax], cl
mov eax, dword [esi + 0x4c]
mov dl, byte [esi + 0x20]
inc eax
mov dword [esi + 0x4c], eax
mov byte [eax], dl
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b4b98]
test eax, eax
je 0x47fa64
cmp eax, 0x80000000
jne 0x47f5de
mov ecx, dword [esi + 0x20]
mov eax, 1
sub eax, ecx
test eax, eax
jge 0x47f5ed
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47f5ed
mov dword [esi + 0x1c], ecx
add dword [esi + 0x20], eax
jmp 0x47fa64
test ebx, ebx
jne 0x47f90d
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x47f90d
lea eax, [esp + 0x64]
push ebx
push eax
call fcn.00464c40
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push ecx
push edx
lea eax, [esp + 0x74]
push eax
call fcn.00464ad0
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x78]
push ebx
mov ebx, dword [esp + 0x154]
push ecx
push edx
push ebx
call fcn.00455970
mov edi, eax
add esp, 0x24
test edi, edi
mov dword [esp + 0x38], edi
je 0x47f8bb
mov eax, dword [edi + 0x10]
test eax, eax
je 0x47f8bb
test byte [edi + 0x2c], 4
jne 0x47f8bb
test byte [ebx + 0x100], 0x20
jne 0x47f8bb
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0x48]
mov ecx, dword [esi + 0x88c]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x4c]
mov ebp, eax
sub ebp, edx
test ecx, ecx
mov dword [esp + 0x4c], 0
je 0x47f726
test ebp, ebp
je 0x47f7e9
xor ecx, ecx
mov ch, byte [eax - 4]
xor ebx, ebx
mov bl, byte [eax - 2]
xor edx, edx
mov dl, byte [eax - 1]
mov cl, byte [eax - 3]
mov edi, edx
and edi, 0xff
shl ecx, 8
or ecx, ebx
xor ebx, ebx
shl ecx, 8
or ecx, edi
inc ecx
shr ecx, 0x18
mov bh, cl
mov byte [eax - 4], cl
xor ecx, ecx
mov cl, byte [eax - 2]
mov bl, byte [eax - 3]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edi
inc ebx
mov ecx, ebx
xor ebx, ebx
mov bh, byte [eax - 4]
shr ecx, 0x10
mov byte [eax - 3], cl
mov bl, cl
xor ecx, ecx
mov cl, byte [eax - 2]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edi
inc ebx
mov ecx, ebx
mov bl, byte [eax - 4]
shl bl, 8
or bl, byte [eax - 3]
shr ecx, 8
shl bl, 8
or bl, cl
shl bl, 8
or bl, dl
inc bl
mov byte [eax - 2], cl
mov byte [eax - 1], bl
jmp 0x47f7e9
mov ecx, dword [esi + 0x50]
add eax, 5
cmp eax, ecx
jbe 0x47f739
push esi
call fcn.00481330
add esp, 4
mov edx, dword [esi + 0x4c]
mov byte [edx], 0x69
mov ecx, dword [esi + 0x4c]
inc ecx
mov dword [esi + 0x4c], ecx
mov eax, ecx
mov byte [eax], 0
mov eax, dword [esi + 0x4c]
inc eax
mov dword [esi + 0x4c], eax
mov byte [eax], 0
mov ebx, dword [esi + 0x4c]
inc ebx
mov dword [esi + 0x4c], ebx
mov eax, ebx
mov byte [eax], 0
mov edi, dword [esi + 0x4c]
inc edi
mov dword [esi + 0x4c], edi
mov eax, edi
mov byte [eax], 0
mov edx, dword [esi + 0x4c]
inc edx
mov edi, 1
mov dword [esi + 0x4c], edx
mov dword [esi + 0x88c], edi
mov eax, dword [0x5b4bf8]
test eax, eax
je 0x47f7a5
cmp eax, 0x80000000
jne 0x47f793
mov eax, edi
jmp 0x47f7a2
test eax, eax
jge 0x47f7a2
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47f7a2
mov dword [esi + 0x1c], ecx
add dword [esi + 0x20], eax
mov eax, dword [esi + 0x50]
add edx, 4
cmp edx, eax
jbe 0x47f7b8
push esi
call fcn.00481330
add esp, 4
mov eax, dword [esi + 0x4c]
mov byte [eax], 0
mov ebx, dword [esi + 0x4c]
inc ebx
mov dword [esi + 0x4c], ebx
mov eax, ebx
mov byte [eax], 0
mov edx, dword [esi + 0x4c]
inc edx
mov dword [esi + 0x4c], edx
mov eax, edx
mov byte [eax], 0
mov ecx, dword [esi + 0x4c]
inc ecx
mov dword [esi + 0x4c], ecx
mov eax, ecx
mov byte [eax], 1
inc dword [esi + 0x4c]
mov dword [esp + 0x4c], edi
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x13c]
push esi
push eax
push ecx
push edx
call dword [eax + 0x10]
add esp, 0x10
test eax, eax
je 0x47fac8
mov eax, dword [esi + 0x88c]
test eax, eax
je 0x47f8a4
test ebp, ebp
je 0x47f8a4
mov eax, dword [esi + 0x4c]
xor ecx, ecx
mov ch, byte [eax - 4]
sub eax, 4
xor ebx, ebx
mov bl, byte [eax + 2]
xor edx, edx
mov dl, byte [eax + 3]
mov cl, byte [eax + 1]
mov edi, edx
and edi, 0xff
shl ecx, 8
or ecx, ebx
xor ebx, ebx
shl ecx, 8
or ecx, edi
dec ecx
shr ecx, 0x18
mov bh, cl
mov byte [eax], cl
xor ecx, ecx
mov cl, byte [eax + 2]
mov bl, byte [eax + 1]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edi
dec ebx
mov ecx, ebx
xor ebx, ebx
mov bh, byte [eax]
shr ecx, 0x10
mov byte [eax + 1], cl
mov bl, cl
xor ecx, ecx
mov cl, byte [eax + 2]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edi
dec ebx
mov ecx, ebx
mov bl, byte [eax]
shl bl, 8
or bl, byte [eax + 1]
shr ecx, 8
shl bl, 8
or bl, cl
shl bl, 8
or bl, dl
dec bl
mov byte [eax + 2], cl
mov byte [eax + 3], bl
mov eax, dword [esi + 0x48]
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x38]
add ebp, eax
mov dword [esi + 0x4c], ebp
mov ebp, dword [esp + 0x50]
mov dword [esi + 0x10], edx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push 2
push eax
push ecx
push esi
call fcn.00476a50
add esp, 0x10
test edi, edi
mov ebx, eax
je 0x47f8f2
mov eax, dword [esi + 0x58]
mov edx, ebx
shl edx, 4
mov ecx, dword [edx + eax + 4]
mov edx, dword [esp + 0x13c]
push edi
push ecx
push edx
call fcn.00462a10
add esp, 0xc
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x10], 1
jne 0x47f961
mov ecx, dword [esp + 0x13c]
push ebx
push esi
push ecx
call fcn.00476b60
jmp 0x47f95e
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push 0
push edx
push eax
push esi
call fcn.00476a50
mov ebx, eax
mov eax, dword [esi + 0x894]
add esp, 0x10
test eax, eax
je 0x47f961
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0xc]
mov eax, dword [esp + 0x40]
mov ecx, dword [edx + eax + 0xc]
mov edx, dword [esp + 0x1c]
mov eax, dword [ecx + edx*4]
mov edx, dword [esi + 4]
mov ecx, dword [ebp + 0x14]
sub ecx, edx
push eax
mov eax, dword [esi + 0x58]
mov edx, ebx
push ecx
shl edx, 4
mov ecx, dword [edx + eax + 4]
push ecx
call fcn.004609f0
add esp, 0xc
cmp ebx, 0xff
jg 0x47f9d1
mov edx, dword [esi + 0x4c]
mov eax, dword [esi + 0x50]
add edx, 2
cmp edx, eax
jbe 0x47f97f
push esi
call fcn.00481330
add esp, 4
mov eax, dword [esi + 0x4c]
mov byte [eax], 1
mov edi, dword [esi + 0x4c]
inc edi
mov dword [esi + 0x4c], edi
mov eax, edi
mov byte [eax], bl
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b4238]
test eax, eax
je 0x47fa5c
cmp eax, 0x80000000
jne 0x47f9b8
mov eax, 1
sub eax, ebx
test eax, eax
jge 0x47fa59
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47fa59
jmp 0x47fa56
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x50]
add ecx, 5
cmp ecx, eax
jbe 0x47f9e7
push esi
call fcn.00481330
add esp, 4
mov edx, dword [esi + 0x4c]
mov byte [edx], 2
mov eax, dword [esi + 0x4c]
inc eax
mov dword [esi + 0x4c], eax
mov ecx, ebx
shr ecx, 0x18
mov byte [eax], cl
mov edx, dword [esi + 0x4c]
inc edx
mov dword [esi + 0x4c], edx
mov eax, edx
mov edx, ebx
shr edx, 0x10
mov byte [eax], dl
mov edi, dword [esi + 0x4c]
inc edi
mov dword [esi + 0x4c], edi
mov eax, edi
mov ecx, ebx
shr ecx, 8
mov byte [eax], cl
mov edi, dword [esi + 0x4c]
inc edi
mov dword [esi + 0x4c], edi
mov eax, edi
mov byte [eax], bl
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b4250]
test eax, eax
je 0x47fa5c
cmp eax, 0x80000000
jne 0x47fa4a
mov eax, 1
sub eax, ebx
test eax, eax
jge 0x47fa59
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47fa59
mov dword [esi + 0x1c], ecx
add dword [esi + 0x20], eax
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edi + 0x10]
inc ebx
inc edx
shl edx, 4
add ebp, edx
cmp ebx, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x50], ebp
jl 0x47f503
mov eax, dword [esp + 0x34]
test eax, eax
je 0x47fb34
mov eax, dword [esi + 0x4c]
cmp eax, dword [esi + 0x50]
jne 0x47fa9e
push esi
call fcn.00481330
add esp, 4
mov ecx, dword [esi + 0x4c]
mov byte [ecx], 0x66
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b4bb0]
test eax, eax
je 0x47fb14
cmp eax, 0x80000000
jne 0x47fb02
mov eax, 1
jmp 0x47fb11
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x47fc5a
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
sub eax, ecx
sub eax, ebp
mov edx, eax
shr edx, 0x18
mov byte [ecx + ebp + 1], dl
mov edx, eax
shr edx, 0x10
mov byte [ecx + ebp + 2], dl
mov edx, eax
shr edx, 8
mov byte [ecx + ebp + 3], dl
mov byte [ecx + ebp + 4], al
jmp 0x47fc5a
test eax, eax
jge 0x47fb11
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47fb11
mov dword [esi + 0x1c], ecx
add dword [esi + 0x20], eax
mov edx, 1
sub edx, ebx
jns 0x47fb28
mov eax, dword [esi + 0x20]
cmp dword [esi + 0x1c], eax
jge 0x47fb28
mov dword [esi + 0x1c], eax
mov eax, 1
sub eax, ebx
jmp 0x47fc57
test ebx, ebx
jle 0x47fc5a
mov edx, dword [esi + 0x4c]
mov ebp, dword [esi + 0x48]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x60]
push ecx
sub edx, ebp
push edx
lea ecx, [eax + 0x18]
push ecx
call dword [eax + 0x48]
mov edx, dword [esp + 0x54]
add esp, 0xc
cmp ebx, 0xff
mov dword [eax + 0xc], edx
jg 0x47fbcf
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x50]
add eax, 2
cmp eax, ecx
jbe 0x47fb7d
push esi
call fcn.00481330
add esp, 4
mov ecx, dword [esi + 0x4c]
mov byte [ecx], 6
mov edi, dword [esi + 0x4c]
inc edi
mov dword [esi + 0x4c], edi
mov eax, edi
mov byte [eax], bl
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b42b0]
test eax, eax
je 0x47fc5a
cmp eax, 0x80000000
jne 0x47fbb6
mov eax, 1
sub eax, ebx
test eax, eax
jge 0x47fc57
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47fc57
jmp 0x47fc54
mov edx, dword [esi + 0x4c]
mov eax, dword [esi + 0x50]
add edx, 5
cmp edx, eax
jbe 0x47fbe5
push esi
call fcn.00481330
add esp, 4
mov eax, dword [esi + 0x4c]
mov byte [eax], 7
mov ebp, dword [esi + 0x4c]
inc ebp
mov dword [esi + 0x4c], ebp
mov ecx, ebx
shr ecx, 0x18
mov eax, ebp
mov byte [eax], cl
mov edx, dword [esi + 0x4c]
inc edx
mov dword [esi + 0x4c], edx
mov eax, edx
mov edx, ebx
shr edx, 0x10
mov byte [eax], dl
mov eax, dword [esi + 0x4c]
inc eax
mov dword [esi + 0x4c], eax
mov ecx, ebx
shr ecx, 8
mov byte [eax], cl
mov edi, dword [esi + 0x4c]
inc edi
mov dword [esi + 0x4c], edi
mov eax, edi
mov byte [eax], bl
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], 0
mov eax, dword [0x5b42c8]
test eax, eax
je 0x47fc5a
cmp eax, 0x80000000
jne 0x47fc48
mov eax, 1
sub eax, ebx
test eax, eax
jge 0x47fc57
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47fc57
mov dword [esi + 0x1c], ecx
add dword [esi + 0x20], eax
mov edx, dword [esi + 0x4c]
mov ebp, dword [esp + 0x30]
mov ebx, dword [esi + 0x48]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
sub edx, ebp
sub edx, ebx
push edx
push eax
push ecx
push esi
call fcn.00481490
mov edi, dword [esp + 0x58]
mov ebx, dword [esp + 0x24]
mov edx, dword [ebx + 0xc]
shl edi, 4
mov eax, dword [edx + edi + 8]
xor ebp, ebp
push eax
mov dword [esp + 0x34], ebp
call fcn.00478500
mov ecx, dword [ebx + 0xc]
mov edx, dword [ecx + edi + 0xc]
push edx
call fcn.00478500
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x74]
mov dword [eax + edi + 8], ecx
mov edx, dword [ebx + 0xc]
mov ebx, dword [esp + 0x54]
mov dword [edx + edi + 0xc], ebp
mov ebp, dword [esp + 0x28]
add esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edi, eax
add edi, ecx
mov ecx, dword [esp + 0x24]
push edi
sub ecx, edi
push eax
lea edx, [esp + 0x20]
add ebx, ecx
push edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x30], edi
call fcn.00404b80
mov edx, dword [esi + 4]
mov eax, edi
sub eax, edx
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00404ba0
push ebp
call fcn.0047d7d0
add esp, 0x1c
test ebx, ebx
jle 0x47fd5b
mov eax, dword [esp + 0x13c]
push ebp
push 0
push ebx
push edi
push eax
call fcn.0047c6b0
add esp, 0x14
test eax, eax
je 0x47f333
mov edi, dword [esp + 0x140]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0x30]
lea edx, [ecx + eax - 1]
cmp ebx, edx
jne 0x47fd41
dec eax
push eax
push ecx
push edi
mov edi, dword [esp + 0x148]
push edi
call fcn.00459d30
push esi
push edi
call fcn.00429890
add esp, 0x18
mov eax, dword [esp + 0x58]
cmp dword [esi + 0x4c], eax
jne 0x47fe68
xor edi, edi
push edi
call fcn.00460c90
push eax
push esi
call fcn.00476c00
mov ebx, eax
add esp, 0xc
cmp ebx, 0xff
jg 0x47fde3
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x50]
add ecx, 2
cmp ecx, eax
jbe 0x47fd9a
push esi
call fcn.00481330
add esp, 4
mov edx, dword [esi + 0x4c]
mov byte [edx], 1
mov eax, dword [esi + 0x4c]
inc eax
mov dword [esi + 0x4c], eax
mov byte [eax], bl
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], edi
mov eax, dword [0x5b4238]
cmp eax, edi
je 0x47fe68
cmp eax, 0x80000000
jne 0x47fdcd
mov eax, 1
sub eax, ebx
cmp eax, edi
jge 0x47fe65
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47fe65
jmp 0x47fe62
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x50]
add eax, 5
cmp eax, ecx
jbe 0x47fdf9
push esi
call fcn.00481330
add esp, 4
mov ecx, dword [esi + 0x4c]
mov byte [ecx], 2
mov edx, dword [esi + 0x4c]
inc edx
mov dword [esi + 0x4c], edx
mov eax, edx
mov edx, ebx
shr edx, 0x18
mov byte [eax], dl
mov eax, dword [esi + 0x4c]
inc eax
mov dword [esi + 0x4c], eax
mov ecx, ebx
shr ecx, 0x10
mov byte [eax], cl
mov edx, dword [esi + 0x4c]
inc edx
mov dword [esi + 0x4c], edx
mov eax, edx
mov edx, ebx
shr edx, 8
mov byte [eax], dl
mov eax, dword [esi + 0x4c]
inc eax
mov dword [esi + 0x4c], eax
mov byte [eax], bl
inc dword [esi + 0x4c]
mov dword [esi + 0x88c], edi
mov eax, dword [0x5b4250]
cmp eax, edi
je 0x47fe68
cmp eax, 0x80000000
jne 0x47fe56
mov eax, 1
sub eax, ebx
cmp eax, edi
jge 0x47fe65
mov ecx, dword [esi + 0x20]
cmp dword [esi + 0x1c], ecx
jge 0x47fe65
mov dword [esi + 0x1c], ecx
add dword [esi + 0x20], eax
mov ecx, dword [esp + 0x140]
mov eax, dword [esp + 0x24]
sub eax, ecx
mov dword [esi + 8], eax
mov eax, dword [esp + 0x13c]
push ebp
push eax
call fcn.0046cb00
lea ecx, [esp + 0x6c]
push ecx
call fcn.00464cc0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret