Function at 0x31f070
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x38f77e
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x3c508c]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x20], 0x39d788
mov dword [esp + 0x24], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov esi, dword [ebp + 8]
add esi, 0xc
lea eax, [esp + 0x20]
mov dword [esp + 0x80], ebx
cmp eax, esi
jne 0x31f0d0
call fcn.0038b3a8
mov eax, dword [esi + 8]
lea edi, [esp + 0x20]
call fcn.0031ffd0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov edi, dword [esp + 0x24]
push ecx
push edx
push edi
call fcn.00320240
call fcn.0031f840
mov ebx, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x14], eax
test ebx, ebx
jle 0x31f32d
mov dword [esp + 0x18], edi
jmp 0x31f114
mov eax, dword [esp + 0x14]
test eax, eax
jl 0x31f0cb
cmp eax, ebx
jge 0x31f0cb
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x54]
push eax
call fcn.003406a0
mov ecx, dword [ebp + 8]
mov byte [esp + 0x80], 1
mov edi, dword [ecx + 0x14]
xor esi, esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], esi
test edi, edi
jle 0x31f28c
xor ebx, ebx
lea esp, [esp]
test ebx, ebx
jl 0x31f0cb
mov eax, dword [ebp + 8]
add eax, 0xc
cmp esi, dword [eax + 8]
jge 0x31f0cb
mov ecx, dword [eax + 4]
lea edx, [esp + 0x34]
add ecx, ebx
push edx
call fcn.003406a0
mov byte [esp + 0x80], 2
mov eax, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x60]
call dword [0x39ad1c]
mov dword [esp + 0x34], 0x3a2cc0
test eax, eax
jl 0x31f220
mov byte [esp + 0x80], 8
cmp dword [esp + 0x44], 0
mov dword [esp + 0x40], 0x39d770
je 0x31f1ec
xor esi, esi
cmp dword [esp + 0x48], esi
jle 0x31f1db
xor edi, edi
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx + edi]
mov eax, dword [edx]
add ecx, edi
push 0
call eax
inc esi
add edi, 0x1c
cmp esi, dword [esp + 0x48]
jl 0x31f1be
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0038b3c0
mov esi, dword [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x3c]
call dword [0x39ad2c]
lea ecx, [esp + 0x38]
mov byte [esp + 0x80], 1
call dword [0x39ad2c]
inc esi
add ebx, 0x20
cmp esi, edi
mov dword [esp + 0x10], esi
jl 0x31f150
jmp 0x31f288
mov byte [esp + 0x80], 6
cmp dword [esp + 0x44], 0
mov dword [esp + 0x40], 0x39d770
je 0x31f26c
xor edi, edi
cmp dword [esp + 0x48], edi
jle 0x31f25f
xor esi, esi
mov edx, dword [esp + 0x44]
mov eax, dword [esi + edx]
lea ecx, [esi + edx]
mov edx, dword [eax]
push 0
call edx
inc edi
add esi, 0x1c
cmp edi, dword [esp + 0x48]
jl 0x31f241
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x44]
push eax
call fcn.0038b3c0
add esp, 4
lea ecx, [esp + 0x3c]
call dword [0x39ad2c]
lea ecx, [esp + 0x38]
mov byte [esp + 0x80], 1
call dword [0x39ad2c]
mov ebx, dword [esp + 0x28]
lea edi, [esp + 0x60]
call fcn.0031f380
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x54]
push ecx
mov ecx, esi
add edx, 0xc
call fcn.0031f8d0
mov dword [esp + 0x54], 0x3a2cc0
mov byte [esp + 0x80], 0xa
cmp dword [esp + 0x64], 0
mov dword [esp + 0x60], 0x39d770
je 0x31f2f7
xor edi, edi
cmp dword [esp + 0x68], edi
jle 0x31f2ea
xor esi, esi
mov edx, dword [esp + 0x64]
mov eax, dword [esi + edx]
lea ecx, [esi + edx]
mov edx, dword [eax]
push 0
call edx
inc edi
add esi, 0x1c
cmp edi, dword [esp + 0x68]
jl 0x31f2d0
mov eax, dword [esp + 0x64]
push eax
call fcn.0038b3c0
add esp, 4
lea ecx, [esp + 0x5c]
call dword [0x39ad2c]
lea ecx, [esp + 0x58]
mov byte [esp + 0x80], 0
call dword [0x39ad2c]
mov eax, dword [esp + 0x14]
add dword [esp + 0x18], 0x20
inc eax
cmp eax, ebx
mov dword [esp + 0x14], eax
jl 0x31f110
mov edi, dword [esp + 0x24]
mov dword [esp + 0x80], 0xffffffff
test edi, edi
je 0x31f363
test ebx, ebx
jle 0x31f35a
mov esi, edi
mov edi, ebx
mov edx, dword [esi]
mov eax, dword [edx]
push 0
mov ecx, esi
call eax
add esi, 0x20
sub edi, 1
jne 0x31f344
mov edi, dword [esp + 0x24]
push edi
call fcn.0038b3c0
add esp, 4
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4