Function at 0x440030
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov eax, dword [0x596ff8]
xor eax, ebp
mov dword [esp + 0x68], eax
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x50], xmm0
movdqa xmmword [esp + 0x40], xmm0
movdqa xmmword [esp + 0x30], xmm0
mov dword [esp + 0x64], 0xffffffff
mov dword [esp + 0x60], 0xffffffff
lea ebx, [esp + 0x20]
push 0x5b
push str..._.._base_native_library_win.cc
push str.LoadNativeLibraryHelper
push ebx
call fcn.0042a970
add esp, 0x10
lea ecx, [esp + 0x30]
push 0
push ebx
call fcn.004391c0
mov eax, dword [0x599744]
mov ecx, dword [0x599af4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x440276
mov edi, dword [ebp + 8]
mov eax, dword [0x599740]
mov dword [esp + 0x10], eax
test eax, eax
je 0x440132
test byte [edi], 1
je 0x4400cd
mov eax, dword [edi + 8]
jmp 0x4400d0
lea eax, [edi + 2]
push 0x1100
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
test eax, eax
je 0x440121
mov esi, eax
mov ecx, dword [0x599748]
test ecx, ecx
jne 0x440115
sub esp, 0x14
movdqa xmm0, xmmword [0x540020]
movdqu xmmword [esp + 4], xmm0
mov dword [esp], str.LibraryLoader.LoadNativeLibraryWindows
call fcn.0042f6f0
add esp, 0x14
mov ecx, eax
mov dword [0x599748], eax
mov eax, dword [ecx]
push 0
call dword [eax + 0x14]
jmp 0x440258
cmp dword [ebp + 0x10], 0
je 0x440132
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x28], 0xffffffff
mov ecx, ebx
call fcn.004280e0
push ebx
call fcn.0043efa0
add esp, 4
test al, al
je 0x440196
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0xffffffff
lea esi, [esp + 0x14]
mov ecx, edi
push esi
call fcn.00428b20
movzx ebx, byte [esp + 0x14]
test bl, 1
je 0x4401a8
mov ebx, dword [esp + 0x18]
test ebx, ebx
jne 0x4401ae
jmp 0x4401b7
mov dword [esp + 0xc], 0
test byte [edi], 1
jne 0x4401d2
add edi, 2
jmp 0x4401d5
shr ebx, 1
test ebx, ebx
je 0x4401b7
push esi
call fcn.0043f0c0
add esp, 4
test ebx, ebx
setne al
mov dword [esp + 0xc], eax
lea ecx, [esp + 0x14]
call fcn.00428200
lea ebx, [esp + 0x20]
test byte [edi], 1
je 0x4401a3
mov edi, dword [edi + 8]
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
cmp dword [ebp + 0x10], 0
je 0x4401f3
test esi, esi
jne 0x4401f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
cmp byte [esp + 0xc], 0
je 0x440203
push ebx
call fcn.0043f0c0
add esp, 4
xor ebx, ebx
test esi, esi
sete bl
lea eax, [ebx + 1]
add ebx, 3
cmp dword [esp + 0x10], 0
cmovne ebx, eax
mov ecx, dword [0x599748]
test ecx, ecx
jne 0x440249
sub esp, 0x14
movdqa xmm0, xmmword [0x540020]
movdqu xmmword [esp + 4], xmm0
mov dword [esp], str.LibraryLoader.LoadNativeLibraryWindows
call fcn.0042f6f0
add esp, 0x14
mov ecx, eax
mov dword [0x599748], eax
mov eax, dword [ecx]
push ebx
call dword [eax + 0x14]
lea ecx, [esp + 0x20]
call fcn.00428200
lea ecx, [esp + 0x30]
call fcn.00439230
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.00512931
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x599744
call fcn.00512977
add esp, 4
cmp dword [0x599744], 0xffffffff
jne 0x4400b3
push 0x5444b2
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.AddDllDirectory
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x599740], eax
push 0x599744
call fcn.005129ed
add esp, 4
jmp 0x4400b3