Function at 0x405390
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov eax, 0x1038c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00406c70
mov ebx, dword [ebp + 0xc]
lea ecx, [ebp - 0x8018]
xor edi, edi
mov dword [esp], ecx
mov eax, 0x8000
mov esi, 0x8000
mov dword [esp + 4], edi
xor edi, edi
mov dword [ebp - 0x1037c], ebx
lea ebx, [ebp - 0x10018]
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], esi
xor edx, edx
mov esi, 0x104
mov dword [esp + 4], edx
mov dword [esp], ebx
lea ebx, [ebp - 0x10238]
call sub.msvcrt.dll_memset
mov dword [esp + 4], edi
lea ecx, [ebp - 0x10128]
mov eax, 0x104
mov dword [esp], ecx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], esi
xor edx, edx
lea esi, [ebp - 0x10258]
mov dword [esp + 4], edx
mov edi, esi
mov dword [esp], ebx
mov ebx, esi
call sub.msvcrt.dll_memset
cld
xor eax, eax
mov ecx, 5
rep stosd dword es:[edi], eax
mov edx, 0x11
mov ecx, 0x400
mov edi, 0xa
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov eax, dword [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x405a9e
mov dword [esp + 4], eax
mov edx, dword [0x412880]
mov dword [esp], edx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x4054cd
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x4054cd
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebx], al
inc edx
test al, al
jne 0x405490
mov esi, dword [0x40a028]
test esi, esi
je 0x4054cd
mov eax, dword [0x40a090]
test eax, eax
je 0x4054cd
mov dword [esp + 0xc], ebx
mov edi, 0x11
mov ecx, str.Resource__d:_t_s_n
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
cld
mov esi, ebx
mov ecx, 5
mov edi, str.true
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov ecx, 0x400
mov dword [esp + 0xc], ecx
xor ebx, ebx
mov esi, 0xe
mov dword [esp + 8], esi
cmp dl, al
mov eax, 0xa
mov dword [esp + 4], eax
sete bl
mov edx, dword [0x412880]
mov dword [esp], edx
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x405a83
mov dword [esp + 4], eax
mov eax, dword [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405597
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405597
xor edx, edx
nop
lea esi, [esi]
movzx eax, byte [edx + ecx]
mov byte [edx + ebp - 0x10128], al
inc edx
test al, al
jne 0x405550
mov edx, dword [0x40a028]
test edx, edx
je 0x405597
mov eax, dword [0x40a090]
test eax, eax
je 0x405597
mov dword [esp], eax
lea ecx, [ebp - 0x10128]
mov esi, 0xe
mov dword [esp + 0xc], ecx
mov edi, str.Resource__d:_t_s_n
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call sub.msvcrt.dll_fprintf
mov edx, 0xa
mov esi, 0x400
mov edi, 0xf
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov eax, dword [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4058e6
mov dword [esp + 4], eax
mov ecx, dword [0x412880]
mov dword [esp], ecx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x4058fc
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x4058fc
xor edx, edx
mov esi, esi
movzx eax, byte [edx + ecx]
mov byte [edx + 0x40a0a0], al
inc edx
test al, al
jne 0x405600
mov edx, dword [0x40a028]
test edx, edx
je 0x405626
mov eax, dword [0x40a090]
test eax, eax
jne 0x405b0d
mov edx, 0xa
mov esi, 0x400
mov edi, 0x10
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov eax, dword [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x405a39
mov dword [esp + 4], eax
mov ecx, dword [0x412880]
mov dword [esp], ecx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405a4f
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405a4f
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebp - 0x8018], al
inc edx
test al, al
jne 0x40568d
mov edx, dword [0x40a028]
test edx, edx
je 0x4056b4
mov eax, dword [0x40a090]
test eax, eax
jne 0x405b35
mov esi, dword [ebp - 0x1037c]
lea edx, [ebp - 0x8018]
lea eax, [ebp - 0x10018]
mov dword [esp + 0xc], esi
mov edi, dword [ebp + 8]
mov dword [esp + 4], edx
mov esi, 0x61707373
mov dword [esp], eax
mov dword [esp + 8], edi
mov edi, 0x22206874
call fcn.00403100
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
mov dword [eax + 0x40a2ac], esi
mov ecx, 0x616c632d
test ebx, ebx
mov dword [eax + 0x40a2a8], ecx
mov dword [eax + 0x40a2b0], edi
mov byte [eax + 0x40a2b4], 0
jne 0x405ab9
cmp byte [ebp - 0x10128], 0
jne 0x405ae9
lea eax, [ebp - 0x10018]
mov edi, 0x40944c
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_strtok
test eax, eax
mov ebx, eax
je 0x405897
mov esi, esi
lea edi, [edi]
mov eax, dword [0x40a090]
test eax, eax
jne 0x4059de
mov dword [esp], ebx
mov ecx, 0x40944e
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strpbrk
test eax, eax
je 0x405a0c
mov dword [esp], ebx
mov edx, 0x5c
xor esi, esi
mov dword [esp + 4], edx
call sub.msvcrt.dll_strrchr
test eax, eax
je 0x405792
sub eax, ebx
lea esi, [eax + 1]
mov byte [ebp - 0x10238], 0
lea ecx, [ebp - 0x10238]
lea edi, [ebp - 0x10238]
mov dword [esp + 8], esi
lea esi, [edi + esi]
mov dword [esp + 4], ebx
mov dword [esp], ecx
call sub.msvcrt.dll_strncpy
mov byte [esi], 0
lea eax, [ebp - 0x10378]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll__findfirst
cmp eax, 0xffffffff
mov ebx, eax
je 0x405870
lea edi, [ebp - 0x10364]
jmp 0x4057f6
mov dword [esp], ebx
lea eax, [ebp - 0x10378]
mov dword [esp + 4], eax
call sub.msvcrt.dll__findnext
test eax, eax
jne 0x405870
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
mov dword [esp], 0x40a2a8
lea eax, [ebp - 0x10238]
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
mov edx, 0x3b
mov word [eax + 0x40a2a8], dx
mov eax, dword [0x40a090]
test eax, eax
je 0x4057e0
mov dword [esp], eax
lea edx, [ebp - 0x10238]
mov ecx, str._____________:_t_s_n
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
lea eax, [ebp - 0x10378]
mov dword [esp + 4], eax
call sub.msvcrt.dll__findnext
test eax, eax
je 0x4057f6
lea esi, [esi]
mov dword [esp], ebx
call sub.msvcrt.dll__findclose
mov dword [esp], 0
mov esi, 0x40944c
mov dword [esp + 4], esi
call sub.msvcrt.dll_strtok
test eax, eax
mov ebx, eax
jne 0x405750
mov dword [esp], 0x40a2a8
mov edi, 0x40a0a0
call sub.msvcrt.dll_strlen
mov byte [eax + 0x40a2a7], 0
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
mov byte [eax + 0x40a2aa], 0
mov ecx, 0x2022
mov word [eax + 0x40a2a8], cx
mov dword [esp + 4], edi
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strcat
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x40a0a0], 0
sub esp, 4
test ebx, ebx
je 0x40595b
mov dword [esp], 0x40a2a8
mov ebx, 0x40a2a8
mov esi, 0x72616a2d
call sub.msvcrt.dll_strlen
mov dword [eax + 0x40a2a8], esi
mov word [eax + ebx + 4], 0x2220
mov byte [eax + ebx + 6], 0
mov edx, dword [ebp + 8]
mov dword [esp], 0x40a2a8
mov dword [esp + 4], edx
call sub.msvcrt.dll_strcat
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
mov ebx, 0x22
mov word [eax + 0x40a2a8], bx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x40a2a8
mov ebx, 0x40a2a8
call sub.msvcrt.dll_strlen
mov edi, dword [ebp - 0x1037c]
mov ecx, 0x72616a2d
mov dword [eax + 0x40a2a8], ecx
mov word [eax + ebx + 4], 0x2220
mov byte [eax + ebx + 6], 0
mov dword [esp + 8], edi
mov eax, dword [ebp + 8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_strncat
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
cmp byte [eax + ebx - 1], 0x5c
je 0x4059b7
mov edx, 0x5c
mov word [eax + 0x40a2a8], dx
mov dword [esp], 0x40a2a8
lea esi, [ebp - 0x10128]
mov dword [esp + 4], esi
call sub.msvcrt.dll_strcat
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
jmp 0x405947
mov dword [esp + 8], ebx
mov esi, str.Add_classpath:_t_s_n
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
mov ecx, 0x40944e
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strpbrk
test eax, eax
jne 0x405776
mov dword [esp + 4], ebx
mov ebx, 0x3b
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strcat
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
mov word [eax + 0x40a2a8], bx
jmp 0x405878
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x8018], 0
sub esp, 4
mov eax, dword [0x40a090]
test eax, eax
je 0x4056b4
mov dword [esp + 0xc], eax
mov edx, 0x1e
mov eax, 1
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.Info:_t_tClasspath_not_defined._n
call sub.msvcrt.dll_fwrite
jmp 0x4056b4
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x10128], 0
sub esp, 4
jmp 0x405597
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x10258], 0
sub esp, 4
jmp 0x4054cd
mov ebx, dword [ebp + 8]
mov dword [esp], 0x40a2a8
mov dword [esp + 4], ebx
call sub.msvcrt.dll_strcat
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
mov edx, 0x3b
mov word [eax + 0x40a2a8], dx
jmp 0x405726
mov dword [esp], 0x40a2a8
lea ecx, [ebp - 0x10128]
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strcat
mov dword [esp], 0x40a2a8
call sub.msvcrt.dll_strlen
jmp 0x405ad8
mov dword [esp], eax
mov ecx, 0x40a0a0
mov esi, 0xf
mov dword [esp + 0xc], ecx
mov edi, str.Resource__d:_t_s_n
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call sub.msvcrt.dll_fprintf
jmp 0x405626
mov dword [esp], eax
lea ecx, [ebp - 0x8018]
mov esi, 0x10
mov dword [esp + 0xc], ecx
mov edi, str.Resource__d:_t_s_n
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call sub.msvcrt.dll_fprintf
jmp 0x4056b4