Function at 0x1004cf50
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100bc1e8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x100f51d4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor esi, esi
lea ebx, [edi + 0x140]
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, 2
jne 0x1004cfa8
lea eax, [esi + 1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x1004cfc3
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 1
jne 0x1004d012
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi + 0x144], eax
je 0x1004cfad
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
lea esp, [esp]
push 0
push 0
push ebx
call edi
push 1
mov esi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 1
je 0x1004cfe0
xor eax, eax
cmp esi, 2
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi + 0x144], eax
mov dword [ebp - 0x20], 3
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0
xor ebx, ebx
push 2
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
call dword [0x100be420]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x1004d0ca
push 0x10
push 1
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x1004d0c1
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x1004d0c1
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x1004d0b8
push dword [ebp - 0x14]
call fcn.10099fa7
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x1004d0b8
push dword [ebp - 0x14]
push dword [ebp - 0x24]
push ebx
call fcn.10096ab0
add esp, 0xc
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_FreeResource]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x1004d113
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x100e3d78
push ebx
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x1004d107
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], 1
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], eax
push ebx
call fcn.10099e3e
mov eax, dword [ebp - 0x14]
add esp, 4
mov dword [edi + 0x150], eax
test eax, eax
je 0x1004d165
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
mov ebx, dword [ebp - 0x20]
movzx edx, cx
mov ecx, ebx
shr eax, 0x10
shr ecx, 0x10
movzx ebx, bx
cmp ax, 2
ja 0x1004d15b
jb 0x1004d14f
test dx, dx
jne 0x1004d15b
test cx, cx
jne 0x1004d15b
mov eax, 0x3ef
cmp bx, ax
ja 0x1004d15b
mov dword [edi + 0x14c], 1
jmp 0x1004d165
mov dword [edi + 0x14c], 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 0x148], eax
test eax, eax
je 0x1004d233
xor esi, esi
lea ebx, [edi + 4]
push dword [esi*4 + 0x100e3ae0]
push dword [edi + 0x148]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebx], eax
cmp esi, 7
jae 0x1004d19f
test eax, eax
je 0x1004d1d7
inc esi
add ebx, 4
cmp esi, 0x4f
jb 0x1004d181
mov eax, dword [edi + 0x18]
push 0
call eax
mov esi, eax
test esi, esi
je 0x1004d216
push str.JudgeVersion
push dword [edi + 0x148]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1004d20f
call eax
mov esi, eax
test esi, esi
jne 0x1004d1e0
lea ebx, [eax + 5]
jmp 0x1004d21b
mov ebx, 3
xor esi, esi
jmp 0x1004d21b
mov eax, dword [edi + 4]
call eax
test eax, eax
jne 0x1004d1ee
lea ebx, [eax + 6]
jmp 0x1004d1f0
xor ebx, ebx
mov eax, dword [edi + 0xc]
call eax
mov esi, eax
test esi, esi
jne 0x1004d200
lea ebx, [eax + 6]
jmp 0x1004d21b
mov dword [ebp + 8], 2
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
jmp 0x1004d238
xor esi, esi
lea ebx, [esi + 3]
jmp 0x1004d21b
mov ebx, 4
push dword [edi + 0x148]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [edi + 0x148], 0
jmp 0x1004d238
mov ebx, 2
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x34], 0
je 0x1004d259
mov eax, dword [ebp - 0x30]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4