Function at 0x40158c
Capabilities:
Access peb ldr_data

Disassembly:
jmp 0x405f90
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4964e0
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
push 0x4b4a80
mov eax, dword [esi]
push eax
call fcn.0043da91
add esp, 8
test eax, eax
je 0x406192
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x14], ebp
jge 0x406042
push esi
lea ecx, [esp + 0x14]
call fcn.0046ef66
push 0x4ae1a0
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x2c], 0
push eax
call fcn.0046f486
mov eax, dword [eax]
push 0
push 0
push eax
mov byte [esp + 0x30], 1
call fcn.0047bcca
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 0
call fcn.0046f1f1
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call fcn.0046f1f1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
mov edi, dword [sym.imp.KERNEL32.dll__lread]
lea ebx, [esi + 4]
push 4
push ebx
push ebp
call edi
lea ecx, [esp + 0x18]
push 4
push ecx
push ebp
call edi
mov eax, dword [ebx]
xor edi, edi
test eax, eax
jle 0x40608d
lea edx, [esi + 0x200c]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x10]
push 8
push eax
push ebp
call dword [sym.imp.KERNEL32.dll__lread]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx]
inc edi
add ecx, 8
cmp edi, eax
mov dword [esp + 0x10], ecx
jl 0x40606d
push 0x2c
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esi + 0x4318], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [esi + 0x431c], eax
mov dword [eax], 0x28
mov ecx, dword [esi + 0x431c]
xor eax, eax
mov dword [esp + 0x10], eax
mov word [ecx + 0xc], 1
mov edx, dword [esi + 0x431c]
mov word [edx + 0xe], 0x18
mov ecx, dword [esi + 0x431c]
mov dword [ecx + 0x10], eax
mov edx, dword [esi + 0x431c]
mov ecx, 0xf9f
mov dword [edx + 0x14], eax
mov edx, dword [esi + 0x431c]
mov dword [edx + 0x18], ecx
mov edx, dword [esi + 0x431c]
mov dword [edx + 0x1c], ecx
mov ecx, dword [esi + 0x431c]
mov dword [ecx + 0x20], eax
mov edx, dword [esi + 0x431c]
mov dword [edx + 0x24], eax
mov ecx, dword [ebx]
cmp ecx, eax
jle 0x40618b
lea edi, [esi + 0x100c]
lea ebp, [esi + 0x200c]
mov ecx, dword [ebp]
lea ecx, [ecx + ecx*2]
mov edx, ecx
and edx, 0x80000003
jns 0x406130
dec edx
or edx, 0xfffffffc
inc edx
mov eax, 4
sub eax, edx
cmp eax, 4
jne 0x40613e
xor eax, eax
lea esi, [ecx + eax]
imul esi, dword [ebp + 4]
push esi
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [edi - 0x1000], eax
je 0x4061aa
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push esi
mov dword [edi], eax
push eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll__lread]
cmp eax, esi
jne 0x4061cd
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx]
inc eax
add edi, 4
add ebp, 8
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x40611b
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
push 0
push 0
push 0x4ae184
call fcn.0047bcca
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
push 0
push 0
push 0x4ae168
call fcn.0047bcca
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret