Function at 0x4031b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
mov edx, dword [ebp + 0x18]
cld
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x5c], edx
lea edx, [ebp - 0x38]
mov edi, edx
mov dword [ebp - 0x60], ecx
mov ecx, 5
mov ebx, dword [ebp + 0x10]
rep stosd dword es:[edi], eax
mov eax, 0x400
movzx ecx, si
mov edi, edx
mov dword [esp + 0xc], eax
mov eax, dword [0x410eb0]
mov edx, 0xa
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4034a8
mov dword [esp + 4], eax
mov eax, dword [0x410eb0]
mov dword [esp], eax
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x403280
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x403280
xor edx, edx
nop
lea esi, [esi]
movzx eax, byte [edx + ecx]
mov byte [edx + edi], al
inc edx
test al, al
jne 0x403240
mov edx, dword [0x410df0]
test edx, edx
je 0x403280
mov eax, dword [0x410e60]
test eax, eax
je 0x403280
mov dword [esp + 8], esi
mov esi, str.Resource__d:_t_s_n
mov dword [esp + 0xc], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
nop
lea esi, [esi]
mov dword [esp], edi
call sub.msvcrt.dll_atoi
mov dword [ebp - 0x64], eax
lea edx, [ebp - 0x58]
xor eax, eax
cld
mov edi, edx
mov ecx, 5
rep stosd dword es:[edi], eax
mov ecx, dword [0x410eb0]
mov eax, 0xa
mov edi, edx
mov dword [esp + 4], eax
movzx edx, bx
mov esi, 0x400
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp], ecx
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x403490
mov dword [esp + 4], eax
mov esi, dword [0x410eb0]
mov dword [esp], esi
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x403340
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x403340
xor edx, edx
lea esi, [esi]
movzx eax, byte [edx + ecx]
mov byte [edx + edi], al
inc edx
test al, al
jne 0x403300
mov edx, dword [0x410df0]
test edx, edx
je 0x403340
mov eax, dword [0x410e60]
test eax, eax
je 0x403340
mov dword [esp + 8], ebx
mov ebx, str.Resource__d:_t_s_n
mov dword [esp + 0xc], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
nop
lea esi, [esi]
mov dword [esp], edi
call sub.msvcrt.dll_atoi
mov dword [ebp - 0x80], eax
cdq
mov edi, dword [ebp - 0x5c]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x80]
mov dword [ebp - 0x7c], edx
mul dword [ebp - 0x80]
imul edi, ebx
mov ebx, dword [ebp - 0x60]
mov esi, edx
mov edx, dword [ebp - 0x7c]
add esi, edi
mov ecx, eax
imul ebx, edx
mov eax, 0x6400000
mov dword [esp + 8], eax
mov dword [esp], ecx
lea edi, [esi + ebx]
xor esi, esi
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
call fcn.004053b0
mov esi, dword [ebp - 0x64]
cmp esi, eax
jge 0x403397
mov esi, eax
test esi, esi
jle 0x403411
mov edi, dword [0x410de0]
xor ecx, ecx
shr edi, 8
xor edi, 1
cmp esi, 0x400
setg cl
test ecx, edi
je 0x403420
mov ecx, dword [0x410e60]
test ecx, ecx
jne 0x403467
test ecx, ecx
mov esi, 0x400
jne 0x40342a
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp], esi
mov ecx, 0xa
add eax, edi
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll__itoa
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov word [eax + edi], 0x206d
mov byte [eax + edi + 2], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x410e60]
test ecx, ecx
je 0x4033cd
mov dword [esp + 0x18], esi
mov edx, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x60]
mov dword [esp], ecx
mov eax, dword [ebp - 0x68]
mov edi, dword [ebp - 0x64]
shrd ebx, edx, 0x14
mov edx, dword [ebp + 0x1c]
mov dword [esp + 0x14], ebx
mov ebx, str.Heap__s:_tRequested__d_MB____d____Available:__d_MB__Heap_size:__d_MB_n
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
call sub.msvcrt.dll_fprintf
jmp 0x4033cd
mov dword [esp + 8], esi
mov eax, 0x400
mov esi, str.Heap_limit:_tReduced__d_MB_heap_size_to_32_bit_maximum__d_MB_n
mov dword [esp], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
call sub.msvcrt.dll_fprintf
mov ecx, dword [0x410e60]
jmp 0x4033c4
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x58], 0
sub esp, 4
jmp 0x403340
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x38], 0
sub esp, 4
jmp 0x403280