Function at 0x41c560
Capabilities:
Extract resource via kernel32 functions
Set current directory

Disassembly:
mov eax, 0x200a4
call fcn.004b8900
push ebx
mov ebx, dword [esp + 0x200b0]
push ebp
mov ebp, ecx
push esi
push edi
test ebx, ebx
je 0x41ca9a
cmp word [ebx], 0
je 0x41ca9a
mov edi, dword [0x4ea24c]
mov esi, dword [0x4ea264]
cmp edi, esi
jl 0x41c629
cmp edi, 0xffff
jl 0x41c5c1
push 0x4d1e48
push str.Too_many_includes.
call fcn.00430790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200a4
ret 0x10
test esi, esi
je 0x41c5d6
add esi, esi
cmp esi, 0xffff
jle 0x41c5db
mov esi, 0xffff
jmp 0x41c5db
mov esi, 0x64
lea eax, [esi*4]
push eax
push dword [0x4ea250]
call fcn.0049f895
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x41c615
push 0x4d1e48
push str.Out_of_memory.
mov ecx, ebp
call fcn.00430790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200a4
ret 0x10
mov edi, dword [0x4ea24c]
mov dword [0x4ea250], ecx
mov dword [0x4ea264], esi
jmp 0x41c62f
mov ecx, dword [0x4ea250]
movzx eax, word [ebx]
test edi, edi
jne 0x41c648
cmp eax, 0x2a
je 0x41c64d
mov eax, dword [ebp + 0x6ac]
mov dword [ecx], eax
jmp 0x41c6cc
cmp eax, 0x2a
jne 0x41c677
push 0x7fff
lea eax, [esp + 0x34]
push ebx
push eax
call fcn.004ab924
xor eax, eax
add esp, 0xc
mov word [esp + 0x1002e], ax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
jmp 0x41c68d
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x34]
push eax
push 0x8000
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp byte [esp + 0x200c0], 0
jne 0x41c6c0
xor esi, esi
test edi, edi
jle 0x41c6c0
nop dword [eax]
lea eax, [esp + 0x30]
push eax
mov eax, dword [0x4ea250]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x41ca3c
inc esi
cmp esi, edi
jl 0x41c6a0
mov eax, dword [0x4ea250]
mov dword [eax + edi*4], 0
cmp word [ebx], 0x2a
mov eax, dword [0x4e59ac]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov byte [esp + 0x2c], 0
jne 0x41c7ef
cmp word [ebx + 2], 0
lea eax, [ebx + 2]
je 0x41c7ef
push 0xa
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x41c7ef
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x41c865
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esp + 0x24], eax
test eax, eax
je 0x41c865
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x24]
push 0x44
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], 0xfde9
call fcn.0049be32
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
mov ecx, dword [0x4eb9b8]
mov dword [esi], vtable.TextStream.0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
cmp ecx, 0xffffffff
je 0x41c7bc
lea eax, [esi + 0x14]
mov dword [esi + 0x10], ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x41c7bc
mov byte [esi + 0x1a], al
mov dword [esi], vtable.TextMem.0
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov byte [esi + 0x3c], 1
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov byte [esi + 0x3c], 0
mov dword [esi + 0x40], 0
jmp 0x41c85c
push 0x38
call fcn.0049be32
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
mov ecx, dword [0x4eb9b8]
mov dword [esi], vtable.TextStream.0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
cmp ecx, 0xffffffff
je 0x41c84f
lea eax, [esi + 0x14]
mov dword [esi + 0x10], ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x41c84f
mov byte [esi + 0x1a], al
mov dword [esi], vtable.TextFile.0
mov dword [esi + 0x34], 0xffffffff
mov eax, dword [esp + 0x200b8]
mov dword [eax], esi
mov esi, dword [esp + 0x200b8]
mov ecx, dword [esi]
test ecx, ecx
je 0x41ca32
push dword [esp + 0x20]
push 0x30c
push dword [esp + 0x18]
call fcn.0047fb60
test al, al
je 0x41ca32
test edi, edi
je 0x41c916
lea eax, [esp + 0x30]
push 0x5c
push eax
call fcn.0049d21e
mov esi, eax
add esp, 8
lea eax, [esp + 0x30]
cmp esi, eax
jbe 0x41c969
xor eax, eax
lea ebx, [esp + 0x30]
mov word [esi], ax
mov cx, word [esp + 0x30]
test cx, cx
je 0x41c8f1
mov ax, word [esp + 0x32]
cmp ax, 0x3a
jne 0x41c8f1
cmp word [esp + 0x34], 0
jne 0x41c8f1
mov word [esp + 0x18], cx
lea ebx, [esp + 0x18]
mov word [esp + 0x1a], ax
mov dword [esp + 0x1c], 0x5c
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x41c90c
cmp byte [0x4eb7dc], 0
je 0x41c90c
mov ecx, ebx
call fcn.00443fc0
mov eax, 0x5c
mov word [esi], ax
jmp 0x41c969
mov esi, dword [ebp + 0x6b0]
movzx eax, word [esi]
mov ecx, eax
test ax, ax
je 0x41c94e
movzx eax, word [esi + 2]
mov edx, eax
cmp eax, 0x3a
jne 0x41c94e
cmp word [esi + 4], 0
jne 0x41c94e
mov word [esp + 0x10], cx
lea esi, [esp + 0x10]
mov word [esp + 0x12], dx
mov dword [esp + 0x14], 0x5c
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x41c969
cmp byte [0x4eb7dc], 0
je 0x41c969
mov ecx, esi
call fcn.00443fc0
mov eax, dword [0x4ea250]
cmp dword [eax + edi*4], 0
jne 0x41c9d7
cmp word [esp + 0x30], 0
je 0x41c9cf
lea esi, [esp + 0x30]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x41c983
sub esi, ecx
sar esi, 1
lea eax, [esi + esi]
lea ecx, [eax + 2]
mov dword [esp + 0x10], eax
call fcn.0047f3f0
mov ebx, eax
test ebx, ebx
je 0x41caa9
test esi, esi
mov esi, dword [esp + 0x10]
je 0x41c9c2
push esi
lea eax, [esp + 0x34]
push eax
push ebx
call fcn.0049ef90
add esp, 0xc
xor eax, eax
mov word [esi + ebx], ax
mov eax, dword [0x4ea250]
jmp 0x41c9d4
mov ebx, 0x4d1e48
mov dword [eax + edi*4], ebx
inc dword [0x4ea24c]
test edi, edi
jne 0x41ca20
push 0xa
push 2
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x41ca06
push edi
push edi
push 0x4d8564
mov ecx, ebp
call fcn.0041cab0
test eax, eax
je 0x41ca9a
mov eax, dword [ebp + 0x6d8]
test eax, eax
je 0x41ca20
push 0
push 0
push eax
mov ecx, ebp
call fcn.0041cab0
test eax, eax
je 0x41ca9a
mov eax, 3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200a4
ret 0x10
cmp byte [esp + 0x200c4], 0
je 0x41ca4e
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200a4
ret 0x10
push ebx
mov ecx, str.Script
test edi, edi
mov eax, str.Include
cmove eax, ecx
push eax
push str._s_file___s__cannot_be_opened.
lea eax, [esp + 0x1003c]
push 0x8040
push eax
call fcn.00482070
add esp, 0x14
lea eax, [esp + 0x10030]
mov ecx, ebp
push 0x4d1e48
push eax
call fcn.00430790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200a4
ret 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x200a4
ret 0x10
call fcn.00430e20
int3