Function at 0x41c950
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov eax, 0x121c
push esi
push ebx
call fcn.00401338
mov ecx, 0x200
sub esp, eax
xor eax, eax
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
lea edi, [esp + 0x850]
mov ecx, 0x270
rep stosd dword es:[edi], eax
lea eax, [esp + 0x850]
mov dword [esp], eax
call fcn.0041d1b0
lea eax, [esp + 0x850]
xor ecx, ecx
mov edx, 0x9c0
call fcn.00403530
test eax, eax
jne 0x41c9ab
mov eax, dword [0x5c6e30]
mov dword [0x5c6e38], eax
mov eax, dword [esp + 0x1234]
xor edx, edx
mov eax, dword [eax + 0x48]
call fcn.00414ab0
test eax, eax
je 0x41cab0
mov dword [esp + 4], 0x7b
mov dword [esp], eax
call sub.cygwin1.dll_strchr
test eax, eax
je 0x41cab0
lea ebx, [eax + 1]
lea eax, [esp + 0x50]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0xa
mov dword [esp], ebx
call sub.cygwin1.dll_strchr
test eax, eax
je 0x41cab0
cmp byte [eax - 1], 0xd
jne 0x41ca11
mov byte [eax - 1], 0
mov byte [eax], 0
add eax, 1
mov dword [esp + 0x18], eax
movzx eax, byte [ebx]
cmp al, 0x20
je 0x41ca30
cmp al, 9
jne 0x41ca3e
lea esi, [esi]
lea edi, [edi]
add ebx, 1
movzx eax, byte [ebx]
cmp al, 9
je 0x41ca30
cmp al, 0x20
je 0x41ca30
cmp al, 0x5b
je 0x41caf0
movzx eax, byte [ebx]
cmp al, 0x7d
je 0x41cbf4
test al, al
jne 0x41ca60
mov ebx, dword [esp + 0x18]
jmp 0x41c9ef
cmp al, 9
je 0x41ca70
cmp al, 0x20
jne 0x41ca7e
nop
lea esi, [esi]
add ebx, 1
movzx eax, byte [ebx]
cmp al, 0x20
je 0x41ca70
cmp al, 9
je 0x41ca70
mov eax, dword [esp + 0x10]
add dword [esp + 0x14], 1
mov dword [eax], ebx
add eax, 0x40
mov dword [esp + 0x10], eax
jmp 0x41ca55
shl ebx, 6
mov eax, dword [esp + ebx + 0x50]
mov dword [esp], str.Error_reading_file__s
mov dword [esp + 4], eax
call sub.cygwin1.dll_printf
lea esi, [esi]
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x1f
mov dword [esp + 4], 1
mov dword [esp], str.Error:_Failed_to_create_image._n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov eax, 0xffffffff
add esp, 0x121c
pop ebx
pop esi
pop edi
pop ebp
ret
lea esi, [ebx + 1]
movzx eax, byte [ebx + 1]
jmp 0x41cb06
add esi, 1
movzx eax, byte [esi]
cmp al, 0x20
je 0x41cb00
cmp al, 9
je 0x41cb00
mov ebp, str.fsbl_config
xor edi, edi
mov ebx, ebp
mov edx, dword [ebx]
add ebx, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x41cb17
mov edx, eax
mov dword [esp + 4], esi
mov dword [esp], ebp
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea edx, [ebx + 2]
mov ecx, eax
cmove ebx, edx
add cl, al
sbb ebx, 3
sub ebx, ebp
mov dword [esp + 8], ebx
call sub.cygwin1.dll_strncmp
test eax, eax
je 0x41cb80
add edi, 1
add ebp, 0x30
cmp edi, 0xa
jne 0x41cb15
mov dword [esp + 4], esi
mov dword [esp], str.ERROR:_Flag__s_not_found_n
call sub.cygwin1.dll_printf
jmp 0x41cab0
lea eax, [edi + edi*2]
add esi, ebx
shl eax, 4
add eax, str.fsbl_config
mov edx, dword [eax + 0x28]
test edx, edx
je 0x41cbc6
mov eax, dword [esp + 0x10]
mov dword [esp], esi
mov dword [esp + 4], eax
call edx
mov esi, eax
test esi, esi
je 0x41cab0
movzx eax, byte [esi]
cmp al, 0x5d
je 0x41cbe6
cmp al, 0x2c
jne 0x41cb06
movzx eax, byte [esi + 1]
add esi, 1
jmp 0x41cb06
mov ecx, dword [eax + 0x20]
xor edx, edx
xor eax, eax
test cl, 0x20
sete al
setne dl
shl edx, cl
shl eax, cl
mov ecx, dword [esp + 0x10]
or dword [ecx + 8], eax
or dword [ecx + 0xc], edx
jmp 0x41cba3
lea ebx, [esi + 1]
movzx eax, byte [ebx]
cmp al, 0x7d
jne 0x41ca51
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], 0
test ecx, ecx
jne 0x41cc23
jmp 0x41d020
add dword [esp + 0x1c], 1
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x14], eax
je 0x41cdf7
mov edx, dword [esp + 0x1c]
shl edx, 6
mov eax, dword [esp + edx + 0x58]
test ah, 2
mov dword [esp + 0x10], eax
je 0x41cc10
lea edi, [esp + 0x854]
mov ecx, 0x21
xor eax, eax
mov ebp, dword [esp + edx + 0x50]
mov dword [esp + 0x18], 0
rep stosd dword es:[edi], eax
lea edi, [esp + 0x58]
mov dword [esp + 0x850], 0x425e90
mov dword [esp + 0x860], 0x100
mov dword [esp + 0x864], 0
mov dword [esp + 0x868], 0x425e98
mov dword [esp + 0x878], 0x100
mov dword [esp + 0x87c], 0
mov dword [esp + 0x880], 0x425ea0
mov dword [esp + 0x888], 0x40000
mov dword [esp + 0x88c], 0
mov dword [esp + 0x890], 0x100
mov dword [esp + 0x894], 0
mov dword [esp + 0x898], 0x425ea8
mov dword [esp + 0x8a0], 0x40000
mov dword [esp + 0x8a4], 0
mov dword [esp + 0x8a8], 0x100
mov dword [esp + 0x8ac], 0
mov dword [esp + 0x8b0], 0x425eb0
mov dword [esp + 0x8c0], 0x500
mov dword [esp + 0x8c4], 0
mov dword [esp + 0x8c8], 0x425eba
mov dword [esp + 0x8d8], 0x700
mov dword [esp + 0x8dc], 0
mov dword [esp + 0x10], 0
test dword [edi], 0x2000
je 0x41cdb3
lea ebx, [esp + 0x850]
mov esi, dword [ebx]
mov dword [esp], esi
call sub.cygwin1.dll_strlen
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp], ebp
call sub.cygwin1.dll_strncmp
test eax, eax
jne 0x41cd9d
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x18], 1
mov dword [edi + 8], eax
mov eax, dword [ebx + 8]
or dword [edi], eax
mov eax, dword [ebx + 0xc]
or dword [edi + 4], eax
mov dword [edi + 0xc], edx
lea eax, [esp + 0x8e0]
add ebx, 0x18
cmp eax, ebx
jne 0x41cd60
mov edx, dword [esp + 0x18]
test edx, edx
je 0x41cde2
add dword [esp + 0x10], 1
add edi, 0x40
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jne 0x41cd51
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x41cc10
mov dword [esp], str.ERROR:_fsbl_config_w_o_bootloader
call sub.cygwin1.dll_puts
jmp 0x41cab0
mov dword [esp + 4], ebp
mov dword [esp], str.ERROR:_Unsupported_fsbl_config:__s_n
call sub.cygwin1.dll_printf
jmp 0x41cab0
lea ebp, [esp + 0x50]
mov dword [esp + 0x18], 0xffffffff
xor ecx, ecx
mov ebx, ebp
mov dword [esp + 0x4c], ebp
jmp 0x41ce2c
test eax, eax
je 0x41ce1c
cmp dword [esp + 0x18], 0xffffffff
jne 0x41d0c6
add ecx, 1
add ebx, 0x40
cmp dword [esp + 0x14], ecx
je 0x41cf72
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x10], eax
mov eax, edx
and eax, 0x1000
test dh, 0x20
je 0x41ce0d
test eax, eax
jne 0x41ce4c
mov dword [esp + 0x18], ecx
jmp 0x41ce1c
mov esi, ebx
mov dword [esp + 0x18], ecx
mov ebp, dword [ebx + 0x14]
mov eax, dword [ebx]
mov edi, dword [ebx + 0x10]
mov dword [esp + 0x24], ebp
mov ebp, dword [ebx + 0x1c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edi
mov edi, dword [ebx + 0x18]
mov dword [esp + 0x2c], ebp
mov ebp, dword [ebx + 0x24]
mov dword [esp + 0x28], edi
mov edi, dword [ebx + 0x20]
mov dword [esp + 0x34], ebp
mov ebp, dword [ebx + 0x2c]
mov dword [esp + 0x30], edi
mov edi, dword [ebx + 0x28]
mov dword [esp + 0x3c], ebp
mov ebp, dword [ebx + 0x34]
mov dword [esp + 0x38], edi
mov edi, dword [ebx + 0x30]
mov dword [esp + 0x44], ebp
mov ebp, dword [ebx + 0x38]
mov dword [esp + 0x40], edi
mov dword [esp + 0x48], ebp
mov ebp, dword [esp + 0x18]
shl ebp, 6
lea eax, [esp + ebp + 0x50]
mov ebp, dword [esp + ebp + 0x50]
mov dword [ebx], ebp
mov ebp, dword [eax + 4]
mov dword [ebx + 4], ebp
mov ebp, dword [eax + 8]
mov dword [ebx + 8], ebp
mov ebp, dword [eax + 0xc]
mov dword [ebx + 0xc], ebp
mov ebp, dword [eax + 0x10]
mov edi, dword [esp + 0x20]
mov dword [ebx + 0x10], ebp
mov ebp, dword [eax + 0x14]
mov dword [ebx + 0x14], ebp
mov ebp, dword [eax + 0x18]
mov dword [ebx + 0x18], ebp
mov ebp, dword [eax + 0x1c]
mov dword [ebx + 0x1c], ebp
mov ebp, dword [eax + 0x20]
mov dword [ebx + 0x20], ebp
mov ebp, dword [eax + 0x24]
mov dword [ebx + 0x24], ebp
mov ebp, dword [eax + 0x28]
mov dword [ebx + 0x28], ebp
mov ebp, dword [eax + 0x2c]
mov dword [ebx + 0x2c], ebp
mov ebp, dword [eax + 0x30]
mov dword [ebx + 0x30], ebp
mov ebp, dword [eax + 0x34]
mov dword [ebx + 0x34], ebp
mov ebp, dword [eax + 0x38]
mov dword [ebx + 0x38], ebp
mov eax, dword [eax + 0x3c]
mov ebp, dword [esp + 0x24]
mov dword [ebx + 0x3c], eax
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x10], edi
mov dword [esi + 8], edx
mov dword [esi], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], ebp
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov dword [esi + 0x1c], ebp
mov ebp, dword [esp + 0x34]
mov dword [esi + 0x18], edi
mov edi, dword [esp + 0x30]
mov dword [esi + 0x24], ebp
mov ebp, dword [esp + 0x3c]
mov dword [esi + 0x20], edi
mov edi, dword [esp + 0x38]
mov dword [esi + 0x2c], ebp
mov ebp, dword [esp + 0x44]
mov dword [esi + 0x28], edi
mov edi, dword [esp + 0x40]
mov dword [esi + 0x34], ebp
mov ebp, dword [esp + 0x48]
mov dword [esi + 0x30], edi
mov dword [esi + 0x38], ebp
jmp 0x41ce1c
mov ebp, dword [esp + 0x4c]
xor ebx, ebx
mov esi, 0x403680
jmp 0x41cfe5
lea eax, [esp + 0x850]
mov dword [esp + 8], 4
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.cygwin1.dll_read
cmp eax, 4
jne 0x41ca92
mov dword [esp], edi
call sub.cygwin1.dll_close
mov eax, dword [esp + 0x850]
bswap eax
cmp eax, 0x90ff0
je 0x41d0df
cmp eax, 0x7f454c46
mov eax, 0x4033b0
cmove eax, esi
mov dword [esp], ebp
call eax
test eax, eax
jne 0x41cab0
add ebx, 1
add ebp, 0x40
cmp dword [esp + 0x14], ebx
je 0x41d020
test byte [ebp + 9], 2
jne 0x41cfd9
mov dword [esp + 4], 0
mov eax, dword [ebp]
mov dword [esp], eax
call sub.cygwin1.dll__open64
test eax, eax
mov edi, eax
jns 0x41cf7f
mov eax, dword [ebp]
mov dword [esp], str.Error_opening_file__s_n
mov dword [esp + 4], eax
call sub.cygwin1.dll_printf
jmp 0x41cab0
mov ebx, dword [0x5c6e38]
xor edx, edx
lea ecx, [ebx + 0x48]
lea eax, [ebx + 0x20]
add edx, dword [eax]
add eax, 4
cmp ecx, eax
jne 0x41d02e
not edx
mov dword [ebx + 0x48], edx
mov ebx, dword [0x5c6e34]
test ebx, ebx
je 0x41d05b
lea ecx, [ebx + 0x3c]
mov eax, ebx
xor edx, edx
add edx, dword [eax]
add eax, 4
cmp ecx, eax
jne 0x41d04d
not edx
mov dword [ebx + 0x3c], edx
mov eax, dword [esp + 0x1230]
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.cygwin1.dll__lseek64
or edx, eax
jne 0x41cab0
mov ebx, dword [0x5c6e2c]
mov esi, dword [0x5c6e30]
test ebx, ebx
jne 0x41d0a6
jmp 0x41d0d8
add esi, eax
sub ebx, eax
je 0x41d0d8
mov eax, dword [esp + 0x1230]
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.cygwin1.dll_write
test eax, eax
jns 0x41d0a0
jmp 0x41cab0
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x50]
shl esi, 6
add esi, eax
jmp 0x41ce52
xor eax, eax
jmp 0x41cadd
mov eax, 0x403400
jmp 0x41cfcc