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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x88
movzx ebx, byte [edx + 0xd]
mov esi, dword [ebp + 0x14]
xor eax, eax
cmp bl, 3
cmovne eax, ebx
cmp al, 1
je 0x478773
movzx eax, al
cmp eax, 2
je 0x478779
mov esi, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
test esi, esi
je 0x478785
mov ecx, dword [ebp + 0x10]
call fcn.00479e77
mov ebx, eax
mov edi, edx
add eax, 8
push dword [ebp + 0x10]
push esi
push eax
call fcn.00570db0
add esp, 0xc
jmp 0x478787
cmp dword [ebp + 8], 0
je 0x478746
push esi
call fcn.0047581c
pop eax
jmp 0x478a5a
xor ebx, ebx
mov eax, dword [esp + 4]
mov edx, 0x5bbcbc
lea ecx, [eax + 0x20]
mov dword [esp + 0x18], ecx
call fcn.00478110
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], edi
mov dword [esp + 8], edx
mov esi, eax
mov edi, dword [eax + 4]
mov ecx, dword [eax]
mov edx, edi
call fcn.00479ed8
mov eax, dword [ebp + 8]
cmp eax, 0x7ffffffe
jbe 0x4787e6
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0x28
mov dword [esp + 0x3c], eax
call fcn.0047345a
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0xc]
jmp 0x478884
mov edx, dword [esi + 0x30]
mov dword [esp + 0x10], ebx
mov ebx, esi
mov eax, edi
add ebx, 0x28
sub eax, edx
jb 0x47883b
mov dword [esp + 0x1c], edi
lea edi, [esp + 0x78]
and dword [edi], 0
mov dword [edi + 4], eax
mov byte [edi + 8], 0
mov ecx, edi
call fcn.00569e49
test eax, eax
je 0x478834
mov dword [esp + 0x28], 4
and dword [esp + 0x2c], 0
and dword [esp + 0x30], 0
mov ecx, ebx
lea edx, [esp + 0x28]
call fcn.00479ef4
jmp 0x47880a
mov edx, dword [esi + 0x30]
mov edi, dword [esp + 0x1c]
mov ecx, dword [ebx]
push 0x5bba24
push edi
call fcn.00404f0a
pop ecx
pop edx
mov ebx, dword [ebp + 8]
cmp dword [eax + 8], ebx
jbe 0x47888d
lea eax, [esp + 0x28]
lea ecx, [esp + 0x38]
mov edx, esi
mov dword [eax + 4], edi
mov dword [eax + 8], ebx
and dword [eax + 0xc], 0
mov dword [eax], 4
push eax
call fcn.00479bf8
pop eax
lea ecx, [esp + 0x20]
call fcn.0047345a
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
jmp 0x478922
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x30]
push 0x5bba34
mov ebx, edi
push edi
call fcn.00404f0a
pop ecx
pop edx
mov edi, dword [ebp + 8]
sub edi, dword [eax + 8]
sub edi, 1
jb 0x4788cf
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x30]
push 0x5bba54
push ebx
call fcn.00404f0a
pop ecx
pop edx
sub esp, 4
mov ecx, eax
xor edx, edx
call fcn.00479f2a
pop eax
jmp 0x4788a8
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x28]
push 0x5bba44
push ebx
call fcn.00404f0a
pop ecx
pop edx
mov edx, dword [esp + 0x10]
mov ecx, eax
push dword [esp + 0x14]
call fcn.00479f2a
pop eax
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x28]
mov edx, esi
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
and dword [eax + 0xc], 0
mov dword [eax], 4
lea ecx, [esp + 0x38]
push eax
call fcn.00479bf8
pop eax
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0xc]
inc dword [eax]
mov eax, dword [esp + 0x38]
cmp eax, 0x2a
jne 0x478a46
lea esi, [esp + 0x38]
mov edi, dword [esi + 4]
mov ecx, esi
push dword [ebp + 0x14]
call fcn.0047581c
pop eax
mov eax, dword [esi]
cmp eax, 0x2a
jne 0x478995
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
mov edx, 0x5bbccc
mov dword [esp + 8], edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
call fcn.00478110
mov ebx, dword [eax + 4]
mov ecx, dword [eax]
mov esi, edx
mov edi, eax
mov edx, ebx
call fcn.00479ed8
mov ecx, dword [ebp + 8]
cmp ecx, 0x7ffffffe
jbe 0x4789bc
mov dword [esp + 0x38], 0x28
mov dword [esp + 0x3c], ecx
jmp 0x4789dd
lea esi, [esp + 0x44]
lea edi, [ebx + 0xc]
mov ecx, dword [esi - 4]
mov edx, dword [esi - 8]
mov dword [esp + 4], ecx
push 0xd
pop ecx
rep movsd dword es:[edi], dword [esi]
mov dword [ebx], eax
mov dword [ebx + 4], edx
mov eax, dword [esp + 4]
mov dword [ebx + 8], eax
jmp 0x478a5a
lea eax, [esp + 0x28]
mov edx, edi
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
and dword [eax + 0xc], 0
mov dword [eax], 5
lea ecx, [esp + 0x38]
push eax
call fcn.00479bf8
pop eax
inc dword [esi]
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x38]
cmp eax, 0x2a
jne 0x478a46
lea esi, [esp + 0x38]
mov edi, dword [esp + 4]
mov eax, dword [esi + 4]
mov ecx, esi
mov edx, edi
mov dword [esp + 0x18], eax
push dword [esp + 0x14]
push dword [esp + 0xc]
call fcn.00478008
pop eax
pop ecx
mov eax, dword [esi]
cmp eax, 0x2a
jne 0x478a62
mov edx, edi
mov edi, dword [esp + 0x18]
lea esi, [esp + 0x38]
mov ecx, esi
push edi
push dword [esp + 0x14]
call fcn.00478008
pop eax
pop ecx
mov eax, dword [esi]
cmp eax, 0x2a
jne 0x478a62
mov eax, dword [esp + 8]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edi
mov dword [ebx], 0x2a
jmp 0x478a5a
lea esi, [esp + 0x40]
lea edi, [ebx + 8]
mov edx, dword [esi - 4]
push 0xe
pop ecx
rep movsd dword es:[edi], dword [esi]
mov dword [ebx], eax
mov dword [ebx + 4], edx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea esi, [esp + 0x3c]
lea edi, [ebx + 4]
push 0xf
pop ecx
rep movsd dword es:[edi], dword [esi]
mov dword [ebx], eax
jmp 0x478a5a