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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dc399
mov eax, dword fs:[0]
push eax
sub esp, 0x310
mov eax, dword [0x5246f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x2c8]
call fcn.00404c60
mov byte [ebp - 4], 1
push 0x45ff89
lea ecx, [ebp - 0x2e4]
push ecx
lea ecx, [ebp - 0x2c8]
call fcn.00402c00
mov edx, dword [eax]
push edx
lea eax, [ebp - 0x2e8]
push eax
lea ecx, [ebp - 0x2c8]
call fcn.00402c30
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x2ec]
push edx
lea ecx, [ebp - 0x2c8]
call fcn.00402c00
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x2f0]
push ecx
call fcn.004039c0
add esp, 0x14
lea edx, [ebp - 0x2c8]
push edx
lea ecx, [ebp - 0x2ac]
call fcn.00404c60
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2ac]
call fcn.00404cf0
push eax
call fcn.00406650
add esp, 4
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x300], eax
mov ecx, dword [ebp - 0x300]
add ecx, 1
mov dword [ebp - 0x304], ecx
mov edx, dword [ebp - 0x300]
mov al, byte [edx]
mov byte [ebp - 0x305], al
add dword [ebp - 0x300], 1
cmp byte [ebp - 0x305], 0
jne 0x406c1e
mov ecx, dword [ebp - 0x300]
sub ecx, dword [ebp - 0x304]
mov dword [ebp - 0x30c], ecx
mov edx, dword [ebp - 0x30c]
push edx
mov eax, dword [ebp - 0x68]
push eax
call fcn.00406670
add esp, 8
mov dword [ebp - 0x290], eax
xor ecx, ecx
mov word [ebp - 0x28c], cx
push 0x206
push 0
lea edx, [ebp - 0x28a]
push edx
call fcn.00463ac0
add esp, 0xc
mov eax, dword [ebp - 0x290]
push eax
push str.id__s
lea ecx, [ebp - 0x28c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea edx, [ebp - 0x28c]
push edx
lea ecx, [ebp - 0x2c]
call fcn.00405d80
mov dword [ebp - 0x310], eax
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x314], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x314]
push ecx
lea ecx, [ebp - 0x2ac]
call fcn.00402bb0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2c]
call fcn.00405540
cmp dword [ebp - 0x68], 0
je 0x406d03
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x2f4], edx
mov eax, dword [ebp - 0x2f4]
push eax
call fcn.0045f531
add esp, 4
cmp dword [ebp - 0x290], 0
je 0x406d27
mov ecx, dword [ebp - 0x290]
mov dword [ebp - 0x2f8], ecx
mov edx, dword [ebp - 0x2f8]
push edx
call fcn.0045f531
add esp, 4
lea ecx, [ebp - 0x2c8]
call fcn.004055b0
mov esi, eax
push 0xffffffffffffffff
push 0x2e
lea ecx, [ebp - 0x2c8]
call fcn.004071d0
sub esi, eax
sub esi, 1
push esi
push 0xffffffffffffffff
push 0x2e
lea ecx, [ebp - 0x2c8]
call fcn.004071d0
add eax, 1
push eax
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x2c8]
call fcn.00402cb0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x84]
call fcn.00404cf0
push eax
lea ecx, [ebp - 0x2ac]
call fcn.00404cf0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x2dc], eax
cmp dword [ebp - 0x2dc], 0
jne 0x406def
mov byte [ebp - 0x2f9], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00405540
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00405540
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00405540
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00405540
mov al, byte [ebp - 0x2f9]
jmp 0x406ff4
mov ecx, dword [ebp - 0x2dc]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x2d8], eax
mov edx, dword [ebp - 0x2d8]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x2d0], eax
mov eax, dword [ebp - 0x2dc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x2d4], eax
lea ecx, [ebp + 0xc]
push ecx
call fcn.00407db0
add esp, 4
movzx edx, al
test edx, edx
jne 0x406e8d
mov byte [ebp - 0x2fa], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00405540
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00405540
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00405540
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00405540
mov al, byte [ebp - 0x2fa]
jmp 0x406ff4
push 0x510430
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x48]
push ecx
call fcn.00403800
add esp, 0xc
mov dword [ebp - 0x318], eax
mov edx, dword [ebp - 0x318]
mov dword [ebp - 0x31c], edx
mov byte [ebp - 4], 5
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x31c]
push ecx
lea edx, [ebp - 0x64]
push edx
call fcn.00407460
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x48]
call fcn.00405540
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x64]
call fcn.00404cf0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2cc], eax
cmp dword [ebp - 0x2cc], 0xffffffff
je 0x406fa3
push 0
lea eax, [ebp - 0x2e0]
push eax
mov ecx, dword [ebp - 0x2d4]
push ecx
mov edx, dword [ebp - 0x2d0]
push edx
mov eax, dword [ebp - 0x2cc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x2cc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x2e0]
xor eax, eax
cmp edx, dword [ebp - 0x2d4]
sete al
mov byte [ebp - 0x2fb], al
lea ecx, [ebp - 0x64]
call fcn.00405540
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00405540
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00405540
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00405540
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00405540
mov al, byte [ebp - 0x2fb]
jmp 0x406ff4
mov byte [ebp - 0x2fc], 0
lea ecx, [ebp - 0x64]
call fcn.00405540
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00405540
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00405540
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00405540
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00405540
mov al, byte [ebp - 0x2fc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045f522
mov esp, ebp
pop ebp
ret