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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52e1df
mov eax, dword fs:[0]
push eax
sub esp, 0x1a8
mov eax, dword [0x57d718]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
movzx edi, word [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x54], ebx
cmp ebx, 0xffffffff
jne 0x42a79e
call fcn.00434ec0
mov ecx, eax
push 1
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x42a797
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x3f
push str.d:jenkins.jenkinsworkspacemgame_aichat_alchattrayutils.cpp
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x3c], 0
mov ebx, eax
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
call fcn.0040c1a0
push 3
push 0x53a170
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
call fcn.0040c1a0
mov byte [ebp - 4], 1
call fcn.00434ec0
mov edi, eax
lea ecx, [ebp - 0x11c]
push 0x403
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00407ba0
mov esi, eax
push str.Release
push esi
mov byte [ebp - 4], 2
call fcn.00406e80
mov eax, dword [ebp - 0x18]
mov ecx, 0x539c58
test eax, eax
cmovne ecx, eax
push ecx
push esi
call fcn.00406e80
push str._fail._last_errno_:
push esi
call fcn.00406e80
add esp, 0x18
mov ecx, esi
push ebx
call fcn.0040f380
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x11c]
call fcn.00408e00
lea ecx, [ebp - 0x34]
call fcn.00408670
lea ecx, [ebp - 0x4c]
call fcn.00408670
xor eax, eax
jmp 0x42aac5
push esi
push edi
push 0x400000
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
push esi
push 0x400000
mov dword [ebp - 0x50], esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0x400000
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x1c], eax
call fcn.00434ec0
push 1
mov ecx, eax
mov edx, dword [eax]
mov edx, dword [edx + 8]
call edx
movzx ecx, al
sub ecx, 1
jne 0x42a8c9
push 0x3f
mov dword [ebp - 0x24], ecx
mov byte [ebp - 0x34], cl
lea ecx, [ebp - 0x34]
push str.d:jenkins.jenkinsworkspacemgame_aichat_alchattrayutils.cpp
mov dword [ebp - 0x20], 0xf
call fcn.0040c1a0
push 3
push 0x53a170
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 3
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
call fcn.0040c1a0
mov byte [ebp - 4], 4
call fcn.00434ec0
mov edi, eax
lea ecx, [ebp - 0x11c]
push 0x40c
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00407ba0
mov esi, eax
push str.HRSRC:
push esi
mov byte [ebp - 4], 5
call fcn.00406e80
add esp, 8
mov ecx, esi
push dword [ebp - 0x50]
call fcn.00428d40
push str._HGLOBAL:
push esi
call fcn.00406e80
add esp, 8
mov ecx, esi
push dword [ebp - 0x18]
call fcn.00428d40
push str._resource_size:
push esi
call fcn.00406e80
add esp, 8
mov ecx, esi
push dword [ebp - 0x1c]
call fcn.0040f380
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x11c]
call fcn.00408e00
lea ecx, [ebp - 0x4c]
call fcn.00408670
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
call fcn.00408670
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x18], 0
test eax, eax
je 0x42a9c5
cmp dword [ebp - 0x14], 0
je 0x42a9c5
mov dword [ebp - 0x18], 1
call fcn.00434ec0
mov ecx, eax
push 1
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x42aabb
push 0x3f
push str.d:jenkins.jenkinsworkspacemgame_aichat_alchattrayutils.cpp
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], al
call fcn.0040c1a0
push 3
push 0x53a170
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 6
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
call fcn.0040c1a0
mov byte [ebp - 4], 7
call fcn.00434ec0
mov edi, eax
lea ecx, [ebp - 0x11c]
push 0x415
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00407ba0
mov esi, eax
push str.write_file_suc._dwWrite:
push esi
mov byte [ebp - 4], 8
call fcn.00406e80
add esp, 8
mov ecx, esi
push dword [ebp - 0x14]
call fcn.0040f380
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x11c]
call fcn.00408e00
lea ecx, [ebp - 0x4c]
call fcn.00408670
lea ecx, [ebp - 0x34]
call fcn.00408670
jmp 0x42aabb
call fcn.00434ec0
mov ecx, eax
push 1
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x42aabb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x3f
push str.d:jenkins.jenkinsworkspacemgame_aichat_alchattrayutils.cpp
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x74], 0
mov ebx, eax
mov dword [ebp - 0x70], 0xf
mov byte [ebp - 0x84], 0
call fcn.0040c1a0
push 3
push 0x53a170
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 9
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0xf
mov byte [ebp - 0x6c], 0
call fcn.0040c1a0
mov byte [ebp - 4], 0xa
call fcn.00434ec0
mov edi, eax
lea ecx, [ebp - 0x1b4]
push 0x418
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x6c]
push eax
call fcn.00407ba0
mov esi, eax
push str.write_file_fail._last_errno:
push esi
mov byte [ebp - 4], 0xb
call fcn.00406e80
add esp, 8
mov ecx, esi
push ebx
call fcn.0040f380
push str._dwWrite_size:
push esi
call fcn.00406e80
add esp, 8
mov ecx, esi
push dword [ebp - 0x14]
call fcn.0040f380
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x1b4]
call fcn.00408e00
lea ecx, [ebp - 0x6c]
call fcn.00408670
lea ecx, [ebp - 0x84]
call fcn.00408670
mov ebx, dword [ebp - 0x54]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bddc0
mov esp, ebp
pop ebp
ret