Function at 0x421020
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x260
push ebx
mov ebx, dword [esp + 0x270]
push ebp
push esi
push edi
test ebx, ebx
je 0x42136e
cmp byte [ebx], 0
je 0x42136e
mov edi, dword [0x4bc3d4]
mov eax, dword [0x4bc3d0]
cmp edi, eax
jl 0x4210e4
cmp edi, 0xffff
jl 0x421080
mov ecx, dword [esp + 0x274]
push 0x4a78b1
push str.Too_many_includes.
call fcn.0043b7d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x260
ret 0x14
test eax, eax
je 0x421096
lea esi, [eax + eax]
cmp esi, 0xffff
jle 0x42109b
mov esi, 0xffff
jmp 0x42109b
mov esi, 0x64
mov ecx, dword [0x4bc3cc]
lea eax, [esi*4]
push eax
push ecx
call fcn.0049393d
add esp, 8
test eax, eax
jne 0x4210d9
mov ecx, dword [esp + 0x274]
push 0x4a78b1
push str.Out_of_memory.
call fcn.0043b7d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x260
ret 0x14
mov dword [0x4bc3cc], eax
mov dword [0x4bc3d0], esi
mov ebp, edi
test ebp, ebp
jne 0x421109
cmp byte [ebx], 0x2a
je 0x42110e
mov edx, dword [esp + 0x274]
mov eax, dword [edx + 0x600]
mov ecx, dword [0x4bc3cc]
mov dword [ecx], eax
jmp 0x42118c
cmp byte [ebx], 0x2a
jne 0x421136
push 0x103
lea edx, [esp + 0x24]
push ebx
push edx
call fcn.00496440
add esp, 0xc
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x127], 0
call dword [sym.imp.USER32.dll_CharUpperA]
jmp 0x42114c
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp byte [esp + 0x280], 0
jne 0x421180
xor esi, esi
test ebp, ebp
jle 0x421180
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov ecx, dword [0x4bc3cc]
mov edx, dword [ecx + esi*4]
lea eax, [esp + 0x20]
push eax
push edx
call edi
test eax, eax
je 0x42121c
inc esi
cmp esi, ebp
jl 0x421162
mov eax, dword [0x4bc3cc]
mov dword [eax + ebp*4], 0
mov edi, ebx
mov ebx, dword [0x4bb4a4]
xor ecx, ecx
mov eax, edi
cmp byte [eax], 0x2a
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov byte [esp + 0x18], cl
jne 0x42123b
inc eax
cmp byte [eax], cl
je 0x42123b
push 0xa
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x42123b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x42125d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esp + 0x10], eax
test eax, eax
je 0x42125d
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x44
mov dword [esp + 0x18], eax
lea edi, [esp + 0x14]
mov ebx, 0xfde9
call fcn.00493f42
add esp, 4
test eax, eax
je 0x42122e
mov esi, eax
call fcn.0041f2e0
mov ecx, dword [esp + 0x278]
mov dword [ecx], eax
jmp 0x42125d
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x260
ret 0x14
mov ecx, dword [esp + 0x278]
xor eax, eax
mov dword [ecx], eax
jmp 0x42125d
push 0x38
call fcn.00493f42
add esp, 4
test eax, eax
je 0x421252
mov esi, eax
call fcn.00404170
jmp 0x421254
xor eax, eax
mov edx, dword [esp + 0x278]
mov dword [edx], eax
mov eax, dword [esp + 0x278]
mov ecx, dword [eax]
test ecx, ecx
je 0x42130f
push 0x30c
mov eax, ebx
mov edx, edi
call fcn.0047d860
test al, al
je 0x42130f
mov ecx, dword [0x4bc3cc]
cmp dword [ecx + ebp*4], 0
jne 0x4212ad
or ecx, 0xffffffff
lea ebx, [esp + 0x20]
call fcn.0047cd90
mov edx, dword [0x4bc3cc]
mov dword [edx + ebp*4], eax
test eax, eax
je 0x4210b6
inc dword [0x4bc3d4]
test ebp, ebp
jne 0x4212fd
push 0xa
push 2
push ebp
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, dword [esp + 0x274]
test eax, eax
je 0x4212e3
push ebp
push ebp
push 0x4ab9ec
mov ecx, esi
call fcn.00421380
test eax, eax
je 0x42136e
mov eax, dword [esi + 0x628]
test eax, eax
je 0x4212fd
push 0
push 0
push eax
mov ecx, esi
call fcn.00421380
test eax, eax
je 0x42136e
mov eax, 3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x260
ret 0x14
cmp byte [esp + 0x284], 0
jne 0x42121c
mov eax, str.Include
test ebp, ebp
jne 0x42132b
mov eax, str.Script
mov ecx, dword [esp + 0x27c]
push ecx
push eax
push str._s_file___s__cannot_be_opened.
mov esi, 0x144
lea edi, [esp + 0x134]
call fcn.0047fde0
mov ecx, dword [esp + 0x280]
add esp, 0xc
push 0x4a78b1
mov edx, edi
push edx
call fcn.0043b7d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x260
ret 0x14
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x260
ret 0x14