Function at 0x4040f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x414
cmp byte [0x4111e0], 0
je 0x404305
mov ecx, 0x67
mov edx, 0xa
mov ebx, 0x400
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4043c9
mov dword [esp + 4], eax
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x4041a0
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x4041a0
xor edx, edx
lea esi, [esi]
lea edi, [edi]
movzx ebx, byte [edx + ecx]
mov byte [edx + 0x411710], bl
inc edx
test bl, bl
jne 0x404170
mov edx, dword [0x409028]
test edx, edx
je 0x4041a0
mov eax, dword [0x409090]
test eax, eax
jne 0x40453d
lea esi, [esi]
lea edi, [edi]
mov dword [esp], 0x411710
call sub.msvcrt.dll_strlen
mov ecx, 0x20
mov word [eax + 0x411710], cx
mov eax, 0x4111e0
mov dword [esp + 4], eax
mov dword [esp], 0x411710
call sub.msvcrt.dll_strcat
cmp byte [0x411260], 0
jne 0x4044da
mov ebx, dword [0x4111d0]
cmp ebx, 1
sete al
cmp ebx, 4
sete cl
or eax, ecx
test al, 1
je 0x404254
mov dword [esp], 0x411710
call sub.msvcrt.dll_strlen
mov ecx, 0x2820
mov edx, 0x411710
dec ebx
mov word [eax + 0x411710], cx
mov byte [eax + edx + 2], 0
mov eax, 0x408207
je 0x404221
mov eax, 0x40820a
mov dword [esp + 4], eax
mov ebx, 0x411710
mov dword [esp], 0x411710
call sub.msvcrt.dll_strcat
mov dword [esp], 0x411710
call sub.msvcrt.dll_strlen
mov edx, 0x7469622d
mov dword [eax + 0x411710], edx
mov word [eax + ebx + 4], 0x29
mov eax, dword [0x4111dc]
test eax, eax
jne 0x4043e4
mov ecx, 0x400
mov edx, 0x15
mov eax, 0xa
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov ebx, dword [0x411680]
mov dword [esp], ebx
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x40450b
mov dword [esp + 4], eax
mov ebx, dword [0x411680]
mov dword [esp], ebx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x404300
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x404300
xor edx, edx
jmp 0x4042d0
movzx eax, byte [edx + ecx]
mov byte [edx + 0x411b10], al
inc edx
test al, al
jne 0x4042d0
mov edx, dword [0x409028]
test edx, edx
je 0x404300
mov eax, dword [0x409090]
test eax, eax
jne 0x404526
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [ebp - 4]
leave
ret
mov ecx, 0x66
mov edx, 0xa
mov ebx, 0x400
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4043ae
mov dword [esp + 4], eax
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x404300
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x404300
xor edx, edx
nop
movzx ebx, byte [edx + ecx]
mov byte [edx + 0x411710], bl
inc edx
test bl, bl
jne 0x404360
mov edx, dword [0x409028]
test edx, edx
je 0x404300
mov eax, dword [0x409090]
test eax, eax
je 0x404300
mov ebx, 0x411710
mov ecx, 0x66
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp], eax
mov edx, str.Resource__d:_t_s_n
mov dword [esp + 4], edx
call sub.msvcrt.dll_fprintf
mov ebx, dword [ebp - 4]
leave
ret
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x411710], 0
sub esp, 4
mov ebx, dword [ebp - 4]
leave
ret
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x411710], 0
sub esp, 4
jmp 0x4041a0
xor edx, edx
mov eax, 0x400
lea ebx, [ebp - 0x408]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov ecx, 0x400
mov eax, 0x68
mov edx, 0xa
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov ecx, dword [0x411680]
mov dword [esp], ecx
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x404565
mov dword [esp + 4], eax
mov ecx, dword [0x411680]
mov dword [esp], ecx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x404261
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x404261
xor edx, edx
lea esi, [esi]
movzx eax, byte [edx + ecx]
mov byte [edx + ebx], al
inc edx
test al, al
jne 0x404470
mov edx, dword [0x409028]
test edx, edx
je 0x4044ad
mov eax, dword [0x409090]
test eax, eax
je 0x4044ad
mov dword [esp + 0xc], ebx
mov edx, 0x68
mov ecx, str.Resource__d:_t_s_n
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 0x411710
call sub.msvcrt.dll_strlen
mov ecx, 0xa
mov word [eax + 0x411710], cx
mov dword [esp + 4], ebx
mov dword [esp], 0x411710
call sub.msvcrt.dll_strcat
jmp 0x404261
mov dword [esp], 0x411710
mov ebx, 0x411260
call sub.msvcrt.dll_strlen
mov edx, 0x202d20
mov dword [eax + 0x411710], edx
mov dword [esp + 4], ebx
mov dword [esp], 0x411710
call sub.msvcrt.dll_strcat
jmp 0x4041da
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x411b10], 0
sub esp, 4
mov ebx, dword [ebp - 4]
leave
ret
mov ebx, 0x411b10
mov ecx, 0x15
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
jmp 0x404398
mov dword [esp], eax
mov edx, 0x411710
mov ebx, 0x67
mov dword [esp + 0xc], edx
mov ecx, str.Resource__d:_t_s_n
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fprintf
jmp 0x4041a0
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x408], 0
sub esp, 4
jmp 0x404261