Function at 0x401b80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push edi
push 0
push 0x80
push 2
push 0
push 2
push 0x120116
push str.msgs.mc
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 4], edi
cmp edi, 0xffffffff
je 0x4020b9
push ebx
push esi
push 0
lea eax, [ebp - 8]
push eax
push 0x100
push str.FacilityNames__r_n____Text0_r_n____Event0x101:MSG_FACILITY_EVENT_r_n____Popup0x102:MSG_FACILITY_POPUP_r_n____EventPopup0x103_r_n__r_n_r_n
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
mov ebx, dword [eax]
mov esi, dword [ebx]
test esi, esi
je 0x401c60
push 0
lea eax, [ebp - 8]
push eax
push 0x22
push str.LanguageNames__r_n
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 0x108]
push eax
push eax
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0x120]
push str._____s0x_X:MSG_05X_r_n
push eax
call fcn.00402410
lea ecx, [ebp - 0x120]
add esp, 0x14
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401c20
sub ecx, edx
lea eax, [ebp - 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x120]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esi]
test esi, esi
jne 0x401bf1
push esi
lea eax, [ebp - 8]
push eax
push 0xa
push str.__r_n_r_n
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [ebx + 0x10c]
test ebx, ebx
je 0x4020a9
nop
mov eax, dword [ebx + 8]
mov esi, eax
mov edi, eax
and esi, 0xfff0000
shr edi, 0x1e
cmp esi, 0xfff0000
je 0x40209c
movzx eax, ax
push eax
lea eax, [ebp - 0x120]
push str.MessageId_d
push eax
call fcn.00402410
lea ecx, [ebp - 0x120]
add esp, 0xc
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401cb0
mov eax, dword [str._Facility]
mov dword [ecx], eax
mov eax, dword [0x418590]
mov dword [ecx + 4], eax
mov eax, dword [0x418594]
mov dword [ecx + 8], eax
mov eax, dword [0x418598]
mov dword [ecx + 0xc], eax
mov eax, dword [0x41859c]
mov dword [ecx + 0x10], eax
mov ax, word [0x4185a0]
mov word [ecx + 0x14], ax
test esi, esi
jne 0x401d2a
lea ecx, [ebp - 0x120]
add ecx, 0xfffffffe
nop word [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401d00
mov eax, dword [str.Text]
mov dword [ecx], eax
mov eax, dword [0x4185a8]
mov dword [ecx + 4], eax
mov ax, word [0x4185ac]
mov word [ecx + 8], ax
jmp 0x401df3
cmp esi, 0x1010000
jne 0x401d68
lea ecx, [ebp - 0x120]
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401d40
mov eax, dword [str.Event]
mov dword [ecx], eax
mov eax, dword [0x4185b4]
mov dword [ecx + 4], eax
mov eax, dword [0x4185b8]
mov dword [ecx + 8], eax
jmp 0x401df3
cmp esi, 0x1020000
jne 0x401da5
lea ecx, [ebp - 0x120]
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401d80
mov eax, dword [str.Popup]
mov dword [ecx], eax
mov eax, dword [0x4185c0]
mov dword [ecx + 4], eax
mov eax, dword [0x4185c4]
mov dword [ecx + 8], eax
jmp 0x401df3
cmp esi, 0x1030000
jne 0x401df3
lea ecx, [ebp - 0x120]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401db6
mov eax, dword [str.EventPopup]
mov dword [ecx], eax
mov eax, dword [0x4185cc]
mov dword [ecx + 4], eax
mov eax, dword [0x4185d0]
mov dword [ecx + 8], eax
mov eax, dword [0x4185d4]
mov dword [ecx + 0xc], eax
mov eax, dword [0x4185d8]
mov dword [ecx + 0x10], eax
mov ax, word [0x4185dc]
mov word [ecx + 0x14], ax
lea ecx, [ebp - 0x120]
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401e00
mov eax, dword [str._Severity]
mov dword [ecx], eax
mov eax, dword [0x4185e4]
mov dword [ecx + 4], eax
mov eax, dword [0x4185e8]
mov dword [ecx + 8], eax
mov eax, dword [0x4185ec]
mov dword [ecx + 0xc], eax
mov eax, dword [0x4185f0]
mov dword [ecx + 0x10], eax
mov ax, word [0x4185f4]
mov word [ecx + 0x14], ax
cmp edi, 1
jne 0x401e6d
lea edi, [ebp - 0x120]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401e50
mov ecx, 7
mov esi, str.Informational
rep movsd dword es:[edi], dword [esi]
jmp 0x401f00
lea ecx, [ebp - 0x120]
add ecx, 0xfffffffe
cmp edi, 2
jne 0x401eaa
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401e80
mov eax, dword [str.Warning]
mov dword [ecx], eax
mov eax, dword [0x418618]
mov dword [ecx + 4], eax
mov eax, dword [0x41861c]
mov dword [ecx + 8], eax
mov eax, dword [0x418620]
jmp 0x401efd
cmp edi, 3
jne 0x401ed5
nop
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401eb0
mov eax, dword [str.Error]
mov dword [ecx], eax
mov eax, dword [0x418628]
mov dword [ecx + 4], eax
mov eax, dword [0x41862c]
mov dword [ecx + 8], eax
jmp 0x401f00
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401ed5
mov eax, dword [str.Success]
mov dword [ecx], eax
mov eax, dword [0x418634]
mov dword [ecx + 4], eax
mov eax, dword [0x418638]
mov dword [ecx + 8], eax
mov eax, dword [0x41863c]
mov dword [ecx + 0xc], eax
lea ecx, [ebp - 0x120]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401f10
movzx eax, word [ebx + 8]
sub ecx, edx
push eax
sar ecx, 1
lea eax, [ebp - 0x120]
push str._SymbolicNameMSG__04d_r_nLanguageEnglish_r_n
lea eax, [eax + ecx*2]
push eax
call fcn.00402410
lea ecx, [ebp - 0x120]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401f44
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 8]
sub ecx, edx
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 4]
call edi
mov edx, dword [ebx + 0x10]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401f77
sub ecx, esi
lea eax, [ebp - 0xc]
mov esi, dword [ebp - 4]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push esi
call edi
push 0
lea eax, [ebp - 0x10]
push eax
push 4
push 0x418698
push esi
call edi
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov edi, dword [eax]
test edi, edi
je 0x402088
nop word [eax + eax]
mov esi, dword [edi + 0x10c]
test esi, esi
je 0x40207b
mov ecx, dword [ebx + 8]
cmp dword [esi + 8], ecx
jne 0x401fde
mov eax, dword [esi + 0xc]
cmp eax, dword [ebx + 0xc]
je 0x401fe4
mov esi, dword [esi]
test esi, esi
jne 0x401fd1
test esi, esi
je 0x40207b
lea eax, [edi + 8]
push eax
lea eax, [ebp - 0x120]
push str.Language_s_r_n
push eax
call fcn.00402410
lea ecx, [ebp - 0x120]
add esp, 0xc
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402010
sub ecx, edx
lea eax, [ebp - 0x14]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esi + 0x10]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402041
sub ecx, esi
lea eax, [ebp - 0x18]
mov esi, dword [ebp - 4]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
push 0x418698
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40207e
mov esi, dword [ebp - 4]
mov edi, dword [edi]
test edi, edi
jne 0x401fc0
push 0
lea eax, [ebp - 0x20]
push eax
push 4
push 0x418698
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [ebx]
test ebx, ebx
jne 0x401c70
mov edi, dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4
push str.cant_create_output_file_n
push 2
call fcn.004069a0
add esp, 4
push eax
call fcn.00402440
add esp, 8
push 1
call fcn.004068c2
int3