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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
mov ebx, dword [ebp + 8]
mov ecx, ebx
push esi
push edi
call fcn.00438a7c
test eax, eax
jne 0x438a73
xorps xmm0, xmm0
mov dword [esp + 0x3c], eax
movlpd qword [esp + 0x30], xmm0
mov dl, al
mov esi, eax
movlpd qword [esp + 0x40], xmm0
mov edi, eax
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], eax
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x43884f
mov eax, dword [esp + 0x44]
cmp eax, dword [ecx + 4]
ja 0x438a6a
jb 0x43884f
mov eax, dword [esp + 0x40]
cmp eax, dword [ecx]
jae 0x438a6a
xor ecx, ecx
mov eax, ecx
mov dword [esp + 0x1c], eax
test dl, dl
jne 0x438895
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x34]
sub eax, edi
mov ecx, dword [ebp + 0xc]
add edx, edi
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
call fcn.00439641
add edi, dword [esp + 0x18]
cmp edi, dword [ebx + 0x38]
push 1
setne cl
mov dword [esp + 0x20], eax
movzx edx, cl
test eax, eax
pop ecx
cmovne edx, ecx
xor ecx, ecx
mov dword [esp + 0x18], edx
test edi, edi
je 0x438a73
mov byte [esp + 0x13], cl
cmp edi, esi
je 0x438932
mov edx, dword [ebx + 0x78]
mov eax, edi
sub eax, esi
push eax
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 0x34]
mov ecx, dword [edx]
add eax, esi
push eax
push edx
call dword [ecx + 0x10]
mov ecx, eax
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x43892e
lea edx, [ecx + esi]
mov dword [esp + 0x30], edx
cmp ecx, dword [esp + 0x2c]
jbe 0x438920
cmp dword [esp + 0x1c], 0
jne 0x43892e
cmp byte [ebx + 0x44], 0
je 0x43894f
mov eax, dword [ebx + 0x38]
sub eax, esi
cmp ecx, eax
ja 0x43894f
cmp byte [esp + 0x18], 0
je 0x43894f
mov eax, dword [ebx + 0x34]
xor ecx, ecx
mov byte [eax + edi], cl
inc edi
cmp edi, edx
jne 0x4388fa
mov ecx, dword [ebx + 0x78]
add eax, esi
push dword [esp + 0x20]
push eax
mov edx, dword [ecx]
push ecx
call dword [edx + 0x10]
cmp dword [esp + 0x20], eax
jne 0x438a6e
mov edx, dword [esp + 0x30]
mov esi, edx
mov dword [esp + 0x14], esi
cmp edi, edx
jne 0x4388a9
mov cl, byte [esp + 0x13]
cmp dword [esp + 0x1c], 0
jne 0x43895e
mov eax, dword [esp + 0x14]
and eax, 0xffffffc0
cmp byte [esp + 0x18], 0
je 0x43895c
test cl, cl
jne 0x438956
mov esi, edi
jmp 0x43895e
xor eax, eax
lea ecx, [eax + 1]
jmp 0x438932
cmp byte [ebx + 0x44], 0
je 0x43895e
mov esi, eax
mov eax, dword [ebp + 0x18]
mov ecx, esi
mov dword [esp + 0x20], ecx
test eax, eax
je 0x43898a
mov edx, dword [eax]
sub edx, dword [esp + 0x40]
mov eax, dword [eax + 4]
sbb eax, dword [esp + 0x44]
cmp dword [esp + 0x3c], eax
jb 0x43898a
ja 0x438984
cmp esi, edx
jbe 0x43898a
mov ecx, edx
mov dword [esp + 0x20], edx
mov edx, dword [ebx + 0x34]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.0043968b
test eax, eax
jne 0x438a73
mov eax, dword [esp + 0x20]
add dword [esp + 0x40], eax
push 0
pop eax
adc dword [esp + 0x44], eax
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x438a73
mov edx, dword [esp + 0x18]
test dl, dl
je 0x4389d2
cmp edi, esi
je 0x438a6a
cmp byte [ebx + 0x44], al
je 0x438a65
test esi, esi
je 0x438a6e
mov eax, dword [esp + 0x14]
cmp eax, esi
jb 0x438a6e
sub eax, esi
mov dword [esp + 0x14], eax
sub edi, esi
je 0x438a05
mov ecx, dword [ebx + 0x34]
push edi
lea eax, [ecx + esi]
push eax
push ecx
call fcn.004183e0
mov edx, dword [esp + 0x24]
add esp, 0xc
cmp dword [ebp + 0x1c], 0
mov esi, dword [esp + 0x14]
je 0x43882d
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
sbb eax, dword [esp + 0x28]
mov dword [esp + 0x34], eax
jne 0x438a35
cmp ecx, 0x400000
jb 0x43882d
mov ecx, dword [ebp + 0x1c]
lea edx, [esp + 0x40]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x44]
push edx
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0xc]
test eax, eax
jne 0x438a73
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
jmp 0x43882d
xor eax, eax
inc eax
jmp 0x438a73
xor eax, eax
jmp 0x438a73
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18