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

Disassembly:
sub esp, 0x18
mov eax, dword [0x56e7f8]
mov ecx, dword [0x56e7fc]
mov dword [esp], eax
mov eax, 0x7f
mov dword [0x56e7fc], eax
mov dword [0x56e7f8], eax
mov eax, dword [0xcf3ea4]
mov dword [esp + 4], ecx
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x404c94
push ebx
push ebp
movsx ebx, word [eax + 0x26]
movsx ebp, word [eax + 0x28]
push esi
push edi
movsx edi, word [eax + 0x24]
mov edx, ebx
mov eax, edi
and edx, 0x3f
and eax, 0x3f
shl edx, 6
add edx, eax
mov esi, dword [edx*4 + 0x5687d0]
test esi, esi
je 0x404b23
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
test eax, eax
jne 0x404b1c
movsx eax, word [esi + 0x28]
cmp eax, dword [0x56e7f8]
jge 0x404b1c
lea ecx, [ebp + 0xe]
cmp eax, ecx
jle 0x404b1c
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x24]
test eax, eax
jne 0x404b1c
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x40]
test eax, 0x20004
jne 0x404b1c
test eax, 0x10000000
je 0x404b12
test ah, 2
je 0x404b1c
movsx ecx, word [esi + 0x28]
mov dword [0x56e7f8], ecx
mov esi, dword [esi + 0x18]
test esi, esi
jne 0x404acf
inc ebx
mov edx, dword [0x56e7f8]
and ebx, 0x3f
mov dword [0x56e7fc], edx
shl ebx, 6
inc edi
and edi, 0x3f
add ebx, edi
mov esi, dword [ebx*4 + 0x5687d0]
test esi, esi
je 0x404bd1
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
test eax, eax
jne 0x404bc4
movsx eax, word [esi + 0x28]
cmp eax, dword [0x56e7f8]
jge 0x404bc4
lea ecx, [ebp + 0xe]
cmp eax, ecx
jle 0x404bc4
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x24]
test eax, eax
jne 0x404bc4
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x40]
test eax, 0x204
jne 0x404bc4
test eax, 0x10000000
je 0x404bc4
movsx edx, word [esi + 0x28]
mov ecx, 0x400
xor eax, eax
mov edi, 0x5677c8
mov dword [0x56e7f8], edx
rep stosd dword es:[edi], eax
mov dword [0x56e7fc], edx
movsx ecx, word [esi + 0x28]
movsx eax, word [esi + 0x26]
push ecx
push eax
movsx ecx, word [esi + 0x24]
push ecx
push edx
call fcn.00404970
add esp, 0x10
mov dword [0x56e7fc], eax
mov esi, dword [esi + 0x18]
test esi, esi
jne 0x404b4b
mov edx, dword [0x56e7fc]
mov esi, dword [0xcf3ec0]
mov dword [0x56e7e0], 1
test esi, esi
je 0x404c55
mov eax, dword [esi + 0x20]
test eax, eax
je 0x404c48
mov edx, dword [esi]
mov edi, dword [esi + 0x78]
mov ecx, esi
call dword [edx + 0x3c]
cmp edi, eax
je 0x404c48
cmp esi, 0xfeeefeee
je 0x404c48
test esi, esi
je 0x404c48
mov eax, dword [esi + 0x20]
test eax, eax
je 0x404c48
mov ecx, dword [esi + 0xc]
mov eax, dword [0x56c7d8]
mov edx, dword [esi + 0x14]
sub ecx, eax
sub edx, eax
mov eax, dword [0x56c7dc]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 8]
mov dword [esp + 0x24], edx
mov edx, dword [esi + 0x10]
sub ecx, eax
sub edx, eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ecx
push eax
mov dword [esp + 0x24], edx
call fcn.0040dbd0
add esp, 4
mov esi, dword [esi + 0x60]
test esi, esi
jne 0x404be5
mov edx, dword [0x56e7fc]
mov eax, dword [0xcf3ea4]
mov ecx, edx
mov dword [0x56e7e0], 0
mov dword [0x56e7f8], ecx
movsx eax, word [eax + 0x28]
add eax, 0x10
pop edi
pop esi
pop ebp
cmp edx, eax
pop ebx
jge 0x404c83
mov ecx, eax
mov dword [0x56e7f8], ecx
cmp dword [esp], ecx
jne 0x404c8f
cmp dword [esp + 4], edx
je 0x404c94
call fcn.0040e790
add esp, 0x18
ret