Function at 0x40b790
Capabilities:
Encode data using xor
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x5804e6
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x5e4a44]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e4a44]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
push 0
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
push 0x104
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x8200
push 0xbb8
push 0xa
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov ebp, eax
test ebp, ebp
jne 0x40b8ed
push 0x5af310
lea ecx, [esp + 0x20]
call fcn.004024e0
push 0x5af31c
lea ecx, [esp + 0x1c]
mov dword [esp + 0x144], ebp
call fcn.004024e0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
mov byte [esp + 0x148], 1
call fcn.00419f40
mov esi, eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x150], 2
call fcn.00419f40
mov esi, dword [esi]
mov eax, dword [eax]
add esp, 0x10
push ebp
push esi
push eax
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b889
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b8b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b8d9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x140], 0xffffffff
mov eax, dword [esp + 0x1c]
jmp 0x40bd9d
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
ja 0x40b9be
push 0x5af310
lea ecx, [esp + 0x1c]
call fcn.004024e0
push 0x5af328
lea ecx, [esp + 0x20]
mov dword [esp + 0x144], 3
call fcn.004024e0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
mov bl, 4
push edx
mov byte [esp + 0x148], bl
call fcn.00419f40
mov esi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x150], 5
call fcn.00419f40
mov esi, dword [esi]
mov eax, dword [eax]
add esp, 0x10
push 0
push esi
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b98a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b9b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 3
jmp 0x40bd6e
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40ba8d
push 0x5af310
lea ecx, [esp + 0x1c]
call fcn.004024e0
push 0x5af334
lea ecx, [esp + 0x20]
mov dword [esp + 0x144], 6
call fcn.004024e0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
mov bl, 7
push edx
mov byte [esp + 0x148], bl
call fcn.00419f40
mov esi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x150], 8
call fcn.00419f40
mov esi, dword [esi]
mov eax, dword [eax]
add esp, 0x10
push 0
push esi
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ba59
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ba80
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 6
jmp 0x40bd6e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40bb5d
push 0x5af310
lea ecx, [esp + 0x1c]
call fcn.004024e0
mov ebx, 9
push 0x5af340
lea ecx, [esp + 0x20]
mov dword [esp + 0x144], ebx
call fcn.004024e0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x148], 0xa
call fcn.00419f40
mov esi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x150], 0xb
call fcn.00419f40
mov esi, dword [esi]
mov eax, dword [eax]
add esp, 0x10
push 0
push esi
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40bb29
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 0xa
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bb51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], bl
jmp 0x40bd6e
push edi
call fcn.00450d15
add esp, 4
mov dword [ebx + 0x50], eax
test eax, eax
jne 0x40bc04
push 0x5af310
lea ecx, [esp + 0x1c]
call fcn.004024e0
push 0x5af34c
lea ecx, [esp + 0x20]
mov dword [esp + 0x144], 0xc
call fcn.004024e0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x148], 0xd
call fcn.00419f40
mov esi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x150], 0xe
call fcn.00419f40
mov edx, dword [esi]
mov eax, dword [eax]
add esp, 0x10
push 0
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x24]
call fcn.00402ba0
lea ecx, [esp + 0x20]
call fcn.00402ba0
lea ecx, [esp + 0x1c]
call fcn.00402ba0
lea ecx, [esp + 0x18]
call fcn.00402ba0
jmp 0x40bdb9
push edi
push esi
push eax
call fcn.00558100
mov esi, dword [ebx + 0x50]
mov eax, 0x24924925
mul edi
mov eax, edi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 2
lea ecx, [eax*8]
sub ecx, eax
mov edx, ecx
mov ecx, edi
lea ebp, [esi + edi]
add esp, 0xc
sub ecx, edx
mov byte [esp + 0x24], 0xad
mov byte [esp + 0x25], 0x5c
mov byte [esp + 0x26], 0xd5
mov byte [esp + 0x27], 0x3b
mov byte [esp + 0x28], 0x79
mov byte [esp + 0x29], 0xba
mov byte [esp + 0x2a], 0x4e
cmp esi, ebp
jae 0x40bc8b
lea ecx, [ecx]
mov eax, 0x24924925
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 2
lea edx, [eax*8]
sub edx, eax
mov eax, ecx
sub eax, edx
mov dl, byte [esp + eax + 0x24]
xor byte [esi], dl
inc esi
inc ecx
cmp esi, ebp
jb 0x40bc60
mov eax, dword [ebx + 0x50]
push 3
push edi
push eax
call fcn.00450a80
add esp, 0xc
mov dword [ebx + 0x54], eax
test eax, eax
je 0x40bcad
cmp eax, 0xffffffff
je 0x40bcad
mov al, 1
jmp 0x40bdbb
push 0x5af310
lea ecx, [esp + 0x1c]
mov dword [ebx + 0x54], 0
call fcn.004024e0
push 0x5af358
lea ecx, [esp + 0x20]
mov dword [esp + 0x144], 0xf
call fcn.004024e0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
mov bl, 0x10
push edx
mov byte [esp + 0x148], bl
call fcn.00419f40
mov esi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x150], 0x11
call fcn.00419f40
mov esi, dword [esi]
mov eax, dword [eax]
add esp, 0x10
push 0
push esi
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40bd3f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bd66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 0xf
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bd8e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x140], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bdb9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.005509f8
add esp, 0x130
ret