Function at 0x4a51b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50b581
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
mov dword [ebp - 0x10], 0
mov esi, dword [ebp + 0xc]
push edi
cmp esi, 0xffff
jbe 0x4a51f7
push 0x15b
push str.G:CheckpointsTPDrvheadgit1LibLocalizer.cpp
push str.dwResource___0xFFFF
call fcn.004904e0
add esp, 0xc
push 0x50daec
lea ecx, [ebp + 0xc]
call fcn.0040c140
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], 0
test bx, bx
jne 0x4a521b
call fcn.004a5020
movzx ebx, ax
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x4a522b
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
mov cx, si
shr cx, 4
inc cx
push ebx
movzx eax, cx
push eax
push 6
push edi
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
jne 0x4a5285
test byte [0x652fc0], 1
je 0x4a5271
movzx eax, bx
push eax
push dword [ebp + 0x10]
movzx eax, si
push eax
push str.Cannot_find_resource_handle_wResource_0x_x__MAKEINTRESOURCE_0x_x__liLanguage_0x_x
push 1
push str.CLocalizer::GetResourceString
call fcn.004cb3a0
add esp, 0x18
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.0040c810
add esp, 4
jmp 0x4a53c1
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x4a52c2
movzx eax, bx
push eax
push dword [ebp + 0x10]
movzx eax, si
push eax
push str.Cannot_load_resource_wResource_0x_x__MAKEINTRESOURCE_0x_x__liLanguage_0x_x
push edi
push str.CLocalizer::GetResourceString
call fcn.004cb3a0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.0040c810
add esp, 0x1c
jmp 0x4a53c1
movzx ecx, si
and ecx, 0x8000000f
jns 0x4a52d2
dec ecx
or ecx, 0xfffffff0
inc ecx
test ecx, ecx
jle 0x4a52e2
movzx eax, word [edi]
lea edi, [edi + eax*2]
add edi, 2
dec ecx
jne 0x4a52d6
movzx esi, word [edi]
xor ecx, ecx
mov edx, 2
add edi, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ce868
push esi
mov ebx, eax
push edi
push ebx
mov dword [ebp + 0x10], ebx
call fcn.004d2873
xor eax, eax
add esp, 0x10
mov word [ebx + esi*2], ax
cmp dword [ebp + 0x18], eax
je 0x4a534b
sub esp, 0x18
mov ecx, esp
push ebx
call fcn.004158d0
lea eax, [ebp - 0x28]
push eax
call fcn.004ca460
add esp, 0x1c
mov edx, eax
cmp dword [edx + 0x14], 8
mov ebx, 2
mov byte [ebp - 4], 1
mov dword [ebp - 0x10], ebx
jb 0x4a5350
mov edx, dword [edx]
jmp 0x4a5350
mov edx, ebx
mov ebx, dword [ebp - 0x10]
test edx, edx
jne 0x4a5358
xor ecx, ecx
jmp 0x4a536f
mov ecx, edx
lea esi, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a5360
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 0xc]
call fcn.0040dad0
mov dword [ebp - 4], 0
test bl, 2
je 0x4a53aa
cmp dword [ebp - 0x14], 8
jb 0x4a5396
push dword [ebp - 0x28]
call fcn.004cf489
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
push dword [ebp + 0x10]
call fcn.004d0e0a
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.0040c810
add esp, 8
mov esi, dword [ebp + 0xc]
add eax, 0x10
mov edi, dword [ebp + 8]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov dword [edi], eax
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4a53ed
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret