Function at 0x403147
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
push 0x40d140
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor ebx, ebx
xor esi, esi
cmp dword [esp + 0x34], ebx
je 0x40316f
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
push 0x40ba74
push 0x40ba70
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x40319c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x40319c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x40d358], eax
mov eax, dword [0x40d358]
cmp eax, ebx
jne 0x4031b5
push str.Panic:_Cant_find_bfs_section_n
call fcn.0040107c
pop ecx
jmp 0x403507
push ebx
push 1
pop ebp
push ebp
push 0x40ba4c
push eax
call fcn.0040459b
add esp, 0x10
test eax, eax
je 0x403227
push ebx
push ebx
push ebx
push 0x40d388
push ebx
push 0xd
push 0xc
lea eax, [esp + 0x40]
push 0x7d1
push eax
mov dword [esp + 0x48], 0x40ba44
mov dword [esp + 0x4c], 0x40ba38
mov dword [esp + 0x50], ebx
call fcn.00402c82
add esp, 0x24
sub eax, ebx
je 0x403227
dec eax
je 0x403217
dec eax
je 0x403210
push str.You_dont_seem_to_have_a_valid_license._nPlease_purchase_a_license_from_http:__www.ActiveState.com_PDK_n
jmp 0x40321c
push str.Your_license_does_not_cover_this_version_of_the_Perl_Dev_Kit._nPlease_purchase_an_upgrade_from_http:__www.ActiveState.com_PDK_n
jmp 0x40321c
push str.Your_trial_license_has_expired._nPlease_purchase_a_license_from_http:__www.ActiveState.com_PDK_n
call fcn.0040107c
pop ecx
jmp 0x40355e
mov edi, dword [sym.imp.MSVCRT.dll___p__environ]
call edi
cmp dword [eax], ebx
je 0x4033f5
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ebx
xor esi, esi
call edi
mov eax, dword [eax]
cmp dword [eax], ebx
je 0x403253
inc esi
call edi
mov eax, dword [eax]
cmp dword [eax + esi*4], ebx
jne 0x403249
lea eax, [esi*4 + 4]
push str.env_kill
push eax
call fcn.0040358d
mov ebp, eax
pop ecx
cmp ebp, ebx
pop ecx
mov dword [esp + 0x20], ebp
je 0x403507
call edi
mov eax, dword [eax]
cmp dword [eax], ebx
je 0x40339c
mov dword [esp + 0x14], ebx
mov ebx, dword [sym.imp.MSVCRT.dll__strnicmp]
mov dword [esp + 0x18], ebp
call edi
mov eax, dword [eax]
mov ecx, dword [esp + 0x14]
push 7
mov esi, dword [eax + ecx]
push esi
push str.PERLAPP
call ebx
add esp, 0xc
test eax, eax
je 0x403383
push 8
push esi
push str.PERLCTRL
call ebx
add esp, 0xc
test eax, eax
je 0x403383
push 7
push esi
push str.PERLSVC
call ebx
add esp, 0xc
test eax, eax
je 0x403383
push 4
push esi
push str.PERL
call ebx
add esp, 0xc
test eax, eax
jne 0x403383
push 0x3d
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
push 9
push esi
push str.PERL5LIB
mov ebp, eax
call ebx
add esp, 0x14
test eax, eax
jne 0x40331a
lea eax, [esi + 9]
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
mov dword [0x40d364], eax
push 9
push esi
push str.PERLLIB
call ebx
add esp, 0xc
test eax, eax
jne 0x40333a
lea eax, [esi + 8]
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
mov dword [esp + 0x10], eax
test ebp, ebp
je 0x40337f
sub ebp, esi
push str.env_kill_entry
inc ebp
lea eax, [ebp + 1]
push eax
call fcn.0040358d
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x403507
push ebp
push esi
push edi
call sub.MSVCRT.dll_memcpy
mov eax, dword [esp + 0x24]
and byte [edi + ebp], 0
add esp, 0xc
inc dword [esp + 0x1c]
add dword [esp + 0x18], 4
mov dword [eax], edi
mov edi, dword [sym.imp.MSVCRT.dll___p__environ]
mov ebp, dword [esp + 0x20]
add dword [esp + 0x14], 4
call edi
mov eax, dword [eax]
mov ecx, dword [esp + 0x14]
cmp dword [eax + ecx], 0
jne 0x40328f
xor ebx, ebx
cmp dword [0x40d364], ebx
jne 0x4033b1
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], ebx
mov dword [0x40d364], eax
cmp dword [esp + 0x10], ebx
je 0x4033c2
push dword [esp + 0x10]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, dword [esp + 0x1c]
dec eax
js 0x4033ea
lea esi, [ebp + eax*4]
lea ebx, [eax + 1]
mov edi, dword [esi]
push edi
call dword [sym.imp.MSVCRT.dll__putenv]
push edi
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
sub esi, 4
dec ebx
pop ecx
jne 0x4033d0
xor ebx, ebx
push ebp
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push 1
pop ebp
push dword [esp + 0x34]
call fcn.00404770
mov dword [esp], str.tmpdir
push str.TMPDIR
mov dword [0x40d35c], eax
call fcn.004035ca
push str.debugger_options
push str.DEBUG
mov dword [0x40d360], eax
call fcn.004035ca
push ebx
push 6
push str.CLEAN
mov esi, eax
push dword [0x40d358]
call fcn.0040459b
push ebx
push 6
push str.TAINT
mov dword [0x40d374], eax
push dword [0x40d358]
call fcn.0040459b
push str.scriptname
push str.SCRIPTNAME
mov dword [0x40d37c], eax
call fcn.004035ca
add esp, 0x38
cmp eax, ebx
mov dword [0x40d368], eax
jne 0x40347f
push str.Panic:_scriptname_not_defined
jmp 0x40321c
push str.script
push eax
call fcn.004035ca
pop ecx
cmp eax, ebx
pop ecx
mov dword [0x40d36c], eax
je 0x40355e
cmp esi, ebx
je 0x403547
push str.PERL5DB
push 0xc8
call fcn.0040358d
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x40355e
push dword [0x40b0c0]
push dword [0x40b0bc]
push str._ENVPERL5DB
push str.PERL5DBBEGIN___PerlApp::P_P___P0__delete__s__eval__s__s___die____if______P_PerlApp::P_BEGIN__require_perl5db.pl_
push edi
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ebx, dword [sym.imp.MSVCRT.dll__putenv]
push edi
call ebx
add esp, 0x18
cmp byte [esi], 0x2d
je 0x403526
push str.PERLDB_OPTS
push esi
call sub.MSVCRT.dll_strlen
pop ecx
add eax, 0x10
push eax
call fcn.0040358d
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x40350c
push 1
pop eax
jmp 0x403585
push esi
push 0x40b768
push edi
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push eax
call sub.MSVCRT.dll_strcat
push edi
call ebx
add esp, 0xc
push esi
mov dword [0x40d370], 0x40b764
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov dword [0x40d378], 1
push 1
pop ebp
jmp 0x40357d
push str.setup
push 0x50
call fcn.0040358d
pop ecx
cmp eax, ebx
pop ecx
mov dword [0x40d370], eax
jne 0x403562
mov eax, ebp
jmp 0x403585
push dword [0x40b0c0]
push dword [0x40b0bc]
push str._eBEGIN__eval__s__s___die____if____
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
mov dword [0x40d380], ebp
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret