Function at 0x40e840
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x160
mov eax, dword [0x43d68c]
xor eax, esp
mov dword [esp + 0x15c], eax
mov eax, dword [esp + 0x164]
push ebx
push ebp
mov ebp, dword [esp + 0x170]
imul ebp, ebp, 0x160
xor ebx, ebx
push edi
mov edi, dword [esp + 0x18c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], ebp
cmp byte [ebp + 0x45014c], bl
je 0x40e8a4
mov ecx, dword [esp + 0x184]
mov edx, dword [esp + 0x188]
mov dword [ebp + 0x450158], ecx
mov dword [ebp + 0x45015c], edx
mov byte [ebp + 0x45014c], bl
cmp byte [0x43d37a], bl
je 0x40f092
mov eax, dword [esp + 0x178]
cmp eax, dword [ebp + 0x450150]
jb 0x40f092
mov eax, edi
mov dword [esp + 0x18], ebx
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40e8d0
sub eax, ecx
push esi
je 0x40e954
mov eax, 2
sub eax, edi
mov edx, edi
mov dword [esp + 0x14], eax
lea esp, [esp]
mov al, byte [edx]
cmp al, 1
jne 0x40e904
cmp byte [ebp + 0x450147], 0
je 0x40e904
mov byte [edx], 0x5b
jmp 0x40e92f
cmp al, 2
jne 0x40e920
cmp byte [ebp + 0x450147], 0
je 0x40e916
mov byte [edx], 0x5d
jmp 0x40e92f
mov ecx, dword [esp + 0x14]
add ecx, edx
mov dword [esp + 0x1c], ecx
cmp al, 0xd
je 0x40e92c
cmp al, 0xa
je 0x40e92c
cmp al, 9
jne 0x40e92f
mov byte [edx], 0x20
mov eax, edi
inc ebx
inc edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e936
sub eax, esi
cmp ebx, eax
jb 0x40e8f0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40e954
lea edx, [edi + eax]
mov dword [esp + 0x5c], edx
jmp 0x40e958
mov dword [esp + 0x5c], edi
push edi
call fcn.0040b920
add esp, 4
test al, al
je 0x40eadb
mov eax, dword [esp + 0x5c]
cmp byte [eax], 0
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
je 0x40e9a1
mov ecx, dword [esp + 0x17c]
sub ecx, dword [ebp + 0x450150]
mov edx, dword [esp + 0x10]
push ecx
push edx
call fcn.0040e710
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x40e9fa
mov esi, bind
jmp 0x40e9fa
mov edi, dword [esp + 0x10]
push 0
push 0
push 0x1004
push edi
mov dword [esp + 0x44], 4
mov dword [esp + 0x4c], 0
call ebx
mov esi, eax
sub esi, 1
js 0x40e9f1
lea eax, [esp + 0x34]
push eax
push 0
push 0x1005
push edi
mov dword [esp + 0x48], esi
call ebx
test eax, eax
je 0x40e9ec
mov ecx, dword [esp + 0x17c]
cmp dword [esp + 0x54], ecx
je 0x40e9f1
sub esi, 1
jns 0x40e9c8
cmp esi, 0xffffffff
je 0x40eadb
mov edx, dword [esp + 0x5c]
cmp byte [edx], 0
je 0x40ec4b
mov eax, dword [esp + 0x17c]
cmp eax, 0xffffffff
jne 0x40ea27
push 0x438a28
push 0x4524c0
call fcn.004124f2
add esp, 8
jmp 0x40ea40
sub eax, dword [ebp + 0x450150]
push eax
push str._08d
push 0x4524c0
call fcn.004124f2
add esp, 0xc
push 0x20
call fcn.00412d99
mov edi, eax
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], eax
push 0x4524c0
mov dword [edi + 0x1c], eax
call fcn.00415183
mov ecx, dword [esp + 0x18]
mov dword [edi + 0x14], eax
add esp, 8
lea eax, [esp + 0x34]
push eax
push 0
push 0x1007
push ecx
mov dword [esp + 0x44], 5
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], 0
mov dword [esp + 0x58], 0xffffffff
mov dword [esp + 0x64], edi
call ebx
cmp eax, 0xffffffff
jne 0x40eaf6
mov edx, dword [esp + 0x17c]
push edx
push str.Error_adding_item__d_to_list_view
push 0x4524c0
call fcn.004124f2
mov eax, dword [esp + 0x1c]
add esp, 0xc
push 0
push str.DebugView_Error
push 0x4524c0
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x15c]
xor ecx, esp
call fcn.004126a4
add esp, 0x160
ret
mov dword [0x440c24], eax
mov eax, dword [0x440c10]
test eax, eax
je 0x40ec4f
lea ecx, [esp + 0x24]
push ecx
push eax
call fcn.004150f1
mov esi, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov ebx, dword [0x440c0c]
add esp, 8
cmp byte [0x440c09], 0
jne 0x40eb92
test ebx, ebx
je 0x40ebcd
push 0
push 0x100000
push esi
push ebp
call fcn.004151e0
xor ecx, ecx
cmp edx, ecx
jl 0x40eb92
jg 0x40eb4f
cmp eax, ebx
jb 0x40eb92
mov edx, dword [0x44f9e0]
push 1
push edx
call fcn.0040f6a0
mov eax, dword [0x450df4]
add esp, 8
push 0x15
push 0x9c6e
push 0x42b
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [0x450df4]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ebp, dword [esp + 0x20]
jmp 0x40ec4f
test ebx, ebx
je 0x40ebcd
push 0
push 0x100000
push esi
push ebp
call fcn.004151e0
xor ecx, ecx
cmp edx, ecx
jl 0x40ebcd
jg 0x40ebb0
cmp eax, ebx
jb 0x40ebcd
xor eax, eax
lea edx, [esp + 0x24]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [0x440c10]
push edx
push eax
call fcn.004150ac
add esp, 8
mov ecx, dword [0x43d380]
cmp ecx, dword [esp + 0x178]
je 0x40ebfb
mov edx, dword [esp + 0x20]
mov ecx, dword [0x440c10]
lea eax, [edx + 0x450028]
push eax
push str.__s__r_n
push ecx
call fcn.00414c60
add esp, 0xc
mov edx, dword [esp + 0x178]
mov eax, 0x4524c0
mov dword [0x43d380], edx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ec10
mov ecx, dword [0x440c10]
push ecx
sub eax, edx
push eax
push 1
push 0x4524c0
call fcn.004146d0
mov edx, dword [0x440c10]
push edx
push 1
push 1
push 0x4389dc
call fcn.004146d0
mov ebp, dword [esp + 0x40]
add esp, 0x20
jmp 0x40ec4f
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x17c]
sub eax, dword [ebp + 0x450150]
cmp byte [ebp + 0x450021], 0
mov dword [ebp + 0x450154], eax
lea eax, [esp + 0x2c]
push eax
je 0x40ec8c
lea ecx, [esp + 0x184]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
push edi
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
jmp 0x40eceb
mov eax, dword [esp + 0x188]
mov ecx, eax
movzx edx, ax
sar ecx, 0x1f
mov ecx, eax
push edx
sar ecx, 0x10
movzx edx, cx
push edx
sar eax, 0x1f
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
push edi
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx ecx, word [esp + 0x180]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add word [edi + 0xc], cx
movzx eax, word [esp + 0x180]
cdq
mov ecx, 0x3e8
idiv ecx
mov word [edi + 0xe], dx
cmp byte [ebp + 0x450021], 0
mov ecx, dword [esp + 0x188]
mov eax, dword [esp + 0x18c]
je 0x40ed51
sub ecx, dword [ebp + 0x450158]
sbb eax, dword [ebp + 0x45015c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
fild qword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fst dword [edi + 0x10]
fldz
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x40ed42
fstp dword [edi + 0x10]
fld dword [edi + 0x10]
fild qword [0x44b8f0]
fdivp st(1)
jmp 0x40ed75
fstp st(0)
fld dword [edi + 0x10]
fild qword [0x44b8f0]
fdivp st(1)
jmp 0x40ed75
sub ecx, dword [ebp + 0x450158]
sbb eax, dword [ebp + 0x45015c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
fild qword [esp + 0x14]
fmul qword [0x4389d0]
fdiv qword [0x4389c8]
fstp dword [edi + 0x10]
mov dword [edi + 0x18], 0
cmp dword [0x440c10], 0
je 0x40eebb
cmp byte [0x43d378], 0
je 0x40ee64
push 0x40
lea edx, [esp + 0xb0]
push edx
push 0
push edi
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
cmp byte [0x440c06], 0
je 0x40ee45
lea eax, [esp + 0xac]
push 0x3a
push eax
call fcn.004143d0
lea ecx, [esp + 0xb4]
sub eax, ecx
add esp, 8
cmp byte [esp + eax + 0xac], 0
je 0x40edfa
cmp byte [esp + eax + 0xac], 0x20
je 0x40edfa
inc eax
cmp byte [esp + eax + 0xac], 0
jne 0x40ede5
lea esi, [esp + eax + 0xac]
lea edx, [esp + 0xec]
mov eax, esi
sub edx, esi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40ee10
mov byte [esi], cl
movzx eax, word [edi + 0xe]
lea edx, [esp + 0xec]
push edx
push eax
lea ecx, [esp + 0xb4]
push ecx
push str._s._03d_s
push 0x4524c0
call fcn.004124f2
add esp, 0x14
jmp 0x40ee7f
xor eax, eax
jmp 0x40ee50
mov cl, byte [esp + eax + 0xac]
mov byte [eax + 0x4524c0], cl
inc eax
test cl, cl
jne 0x40ee50
jmp 0x40ee7f
fld dword [edi + 0x10]
sub esp, 8
fstp qword [esp]
push str._10.8f
push 0x4524c0
call fcn.004124f2
add esp, 0x10
mov eax, 0x4524c0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ee87
sub eax, edx
mov edx, dword [0x440c10]
push edx
push eax
push 1
push 0x4524c0
call fcn.004146d0
mov eax, dword [0x440c10]
push eax
push 1
push 1
push 0x4389dc
call fcn.004146d0
add esp, 0x20
mov eax, dword [esp + 0x5c]
xor ebx, ebx
mov dword [esp + 0x1c], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40eec8
sub eax, edx
je 0x40ef4d
mov edx, dword [esp + 0x5c]
mov ebp, 2
sub ebp, edx
mov edi, edi
mov al, byte [edx]
cmp al, 1
jne 0x40eef8
mov ecx, dword [esp + 0x20]
cmp byte [ecx + 0x450147], 0
je 0x40eef8
mov byte [edx], 0x5b
jmp 0x40ef24
cmp al, 2
jne 0x40ef15
mov ecx, dword [esp + 0x20]
cmp byte [ecx + 0x450147], 0
je 0x40ef0e
mov byte [edx], 0x5d
jmp 0x40ef24
lea ecx, [edx + ebp]
mov dword [esp + 0x1c], ecx
cmp al, 0xd
je 0x40ef21
cmp al, 0xa
je 0x40ef21
cmp al, 9
jne 0x40ef24
mov byte [edx], 0x20
mov eax, dword [esp + 0x5c]
inc ebx
inc edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ef30
sub eax, esi
cmp ebx, eax
jb 0x40eee0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x40ef4d
mov eax, dword [esp + 0x5c]
add eax, ecx
jmp 0x40ef51
mov eax, dword [esp + 0x5c]
mov edx, 0x4524c0
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x40ef58
cmp byte [0x4524c0], cl
jne 0x40ef76
mov edx, 0x20
mov word [0x4524c0], dx
push 0x4524c0
call fcn.00415183
mov dword [edi + 0x1c], eax
mov esi, dword [0x440c10]
add esp, 4
test esi, esi
je 0x40f049
mov eax, 0x4524c0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40efa0
push esi
sub eax, edx
push eax
push 1
push 0x4524c0
call fcn.004146d0
mov eax, dword [0x440c10]
push eax
push 2
push 1
push 0x438908
call fcn.004146d0
mov ecx, dword [0x440c10]
push ecx
call fcn.00415050
add esp, 0x24
cmp dword [0x43d37c], 0x410
jne 0x40f049
push 0x40
lea edx, [esp + 0x130]
push edx
push 0
push 0
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_GetDateFormatA]
mov ecx, 0x44f9a0
lea eax, [esp + 0x12c]
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40f030
test dl, dl
je 0x40f02c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40f030
add eax, 2
add ecx, 2
test dl, dl
jne 0x40f010
xor eax, eax
jmp 0x40f035
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40f049
mov eax, dword [0x44f9e0]
push 1
push eax
call fcn.0040f6a0
add esp, 8
push str.DBGVIEWCLEAR
push 0x4524c0
call fcn.00412e70
add esp, 8
test eax, eax
je 0x40f072
mov ecx, dword [esp + 0x10]
push 1
push 0
push 0
push ecx
call fcn.00402b60
add esp, 0x10
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x10]
push eax
push eax
push 0x1015
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, 1
jmp 0x40eadd
mov ecx, dword [esp + 0x168]
pop edi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004126a4
add esp, 0x160
ret